#include using namespace std; int main () { int M, D; cin >> M >> D; if (8 < M) { cout << 24 << "\n"; return 0; } if (M == 8) { if (22 <= D) { cout << 24 << "\n"; return 0; } } cout << 23 << "\n"; }