#include <stdio.h>
int sum(int a, int b) {
return a + b;
}
int main(int argc, int** argv) {
int a;
int b;
int s;
freopen("aplusb.in", "r", stdin);
freopen("aplusb.out", "w", stdout);
scanf("%d%d", &a, &b);
s = 0;
if (a < 0) {
a = -a;
if (b < 0) {
b = -b;
s = a + b;
} else {
while (s <= 0) {
switch (a) {
case 1:
s = s + 3;
break;
case 2:
s = s - 4;
a = a - 1;
break;
default:
s = 1;
}
}
}
} else if (b < 0) {
b = -b;
s = (a + b) * (a - b);
} else {
s = sum(a, b) * sum(a, b);
}
printf("%d\n", s);
fclose(stdin);
fclose(stdout);
}