#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;
}