#include using namespace std; typedef long long ll; typedef string str; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll m, d; cin >> m >> d; if (m > 8 || m == 8 && d >= 22) cout << 24; else cout << 23; return 0; }