#include #include #include #include #include #include #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using P = pair; int main() { int count = 0; rep(i,32) { if(i>=10) { int P = i%10 + (i%100)/10; if(P == 1) { count++; } else if(P == 3) { count++; } else if(P == 5) { count++; } else if(P == 7) { count++; } else if(P == 8) { count++; } else if(P == 10) { count++; } else if(P == 12) { count++; } } else { int P = i%10; if(P == 1) { count++; } else if(P == 3) { count++; } else if(P == 5) { count++; } else if(P == 7) { count++; } else if(P == 8) { count++; } else if(P == 10) { count++; } else if(P == 12) { count++; } } } rep(i,31) { if(i>=10) { int P = i%10 + (i%100)/10; if(P == 4) { count++; } else if(P == 6) { count++; } else if(P == 11) { count++; } } else { int P = i%10; if(P == 4) { count++; } else if(P == 6) { count++; } else if(P == 9) { count++; } else if(P == 11) { count++; } } } rep(i,29) { if(i>=10) { int P = i%10 + (i%100)/10; if(P == 2) { count++; } } else { int P = i%10; if(P == 2) { count++; } } } cout << count << endl; }