#include using namespace std; int main(){ int a, b; cin >> a >> b; if(a < 23 && (b >= 23 && b <= 25)){ b -= 22; b = 3 - b; cout << b; }else if(b > 25 && (a >= 23 && a <= 25)){ a = 26 - a; a = 3 - a; cout << a; }else if((a >= 23 && a <= 25) && (b >= 23 && b <= 25)){ b -= a + 1; b = 3 - b; cout << b; }else{ cout << 3; } return 0; }