#include <iostream>
#include <math.h>
using namespace std;
int main() {
double x, y;
scanf("%lf %lf", &x, &y);
double u = (y>=x*x) && (y<=exp(-x)) && (y<=exp(x))? x+y : x-y;
printf("%7.3lf", u);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglkb3VibGUgeCwgeTsKCXNjYW5mKCIlbGYgJWxmIiwgJngsICZ5KTsKCWRvdWJsZSB1ID0gKHk+PXgqeCkgJiYgKHk8PWV4cCgteCkpICYmICh5PD1leHAoeCkpPyB4K3kgOiB4LXk7CglwcmludGYoIiU3LjNsZiIsIHUpOwoJcmV0dXJuIDA7Cn0=