#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int test = 1; // cin >> test; while(test--){ int M,D; cin >> M >> D; if(M < 8 || (M == 8 && D < 22)) cout << 23 << endl; else cout << 24 << endl; } }