import java.io.*; import java.util.*; import java.math.*; class Main188 { public static void out (Object o) { System.out.println(o); } public static int getSum (int n) { int ret = 0; while (n != 0) { ret += n % 10; n /= 10; } return ret; } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] max = {0,31,28,31,30,31,30,31,31,30,31,30,31}; int ans = 0; for (int m = 1; m < max.length; m++) { for (int d = 1; d <= max[m]; d++) { if (m == getSum(d)) ans++; } } out(ans); } }