/** * author: boutarou * created: 02.08.2020 11:05:43 **/ #include using namespace std; #define rep(i,n) for(int i = 0; i < int(n); i++) using ll = long long; using P = pair; int digit(int x) { int res = 0; while (x > 0) { res += x % 10; x /= 10; } return res; } int month[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int main() { int cnt = 0; for (int i = 1; i <= 12; i++) { for (int j = 1; j <= month[i]; j++) { if (i == digit(j)) cnt++; } } cout << cnt << endl; return 0; }