#include #include using namespace std; int main() { int x, y; cin >> x >> y; if (x > y) swap(x, y); if (y - x == 8) cout << x + 4 << endl; else cout << (y + 4) % 12 << endl; return 0; }