#include using namespace std; template using vec = vector; template using vvec = vector>; constexpr int64_t mpow(int64_t a, int64_t b, int64_t mod = 1000000007) { if (b <= 0) { return 1; } if (b == 1) { return a % mod; } if (b == 2) { return (a * a) % mod; } return (max(a * (b & 1), (int64_t)1) * mpow(mpow(a, b / 2, mod), 2, mod)) % mod; } constexpr int64_t mdiv(int64_t a, int64_t b, int64_t mod = 1000000007) { return (a * mpow(b, mod - 2, mod)) % mod; } int main() { constexpr int ans = []() { int ret = 0; for (int i = 1; i <= 12; ++i) { int limit = 0; if (i <= 7) limit = 30 + (i & 1) - (i == 2) * 2; else limit = 30 + !(i & 1); for (int j = 1; j <= limit; ++j) { int k = j; int sum = 0; while (k) { sum += k % 10; k /= 10; } if (i == sum) ++ret; } } return ret; }(); cout << ans << endl; }