// 441_A.cpp 2024/08/23 20:53:24 #include using namespace std; typedef long long ll; const int mod = 998244353, mod1 = 1000000007, inf = 1070000000; const ll linf = 4610000000000000000; #define REP(i,x,y) for (auto i = (x); i < (y); i++) #define RREP(i,x,y) for (auto i = (y) - 1; (x) <= i; i--) #define ALL(x) (x).begin(), (x).end() template bool inr(const T &l, const T &x, const T &r){return (l<=x && x bool chmax(T &a, const T &b){if(a < b){a = b; return 1;} else return 0;} template bool chmin(T &a, const T &b){if(b < a){a = b; return 1;} else return 0;} #include using namespace atcoder; #pragma GCC optimize("O3") int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int M,D; cin >> M >> D; if(M < 8){ cout << 23 << '\n'; }else if(M == 8){ if(D < 22){ cout << 23 << '\n'; }else{ cout << 24 << '\n'; } }else{ cout << 24 << '\n'; } }