#include int main () { int a = 0; int b = 0; int res = 0; int ans = 0; res = scanf("%d", &a); res = scanf("%d", &b); if (a > b) { int swap = a; a = b; b = swap; } ans = a+b; while (a > 0 && ans > 0) { a--; ans -= 2; if (ans < 0) { ans += 2; } } printf("%d\n", ans); return 0; }