import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class No0188 { static final Scanner in = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static int[] days = {0,31,28,31,30,31,30,31,31,30,31,30,31}; static void solve() { int 誕生日おめでとうございます = 0; for (int i=1; i<=12; i++) { for (int j=1; j<=days[i]; j++) { if (j < 10 && i == j) 誕生日おめでとうございます++; else if (j >= 10 && i == j/10 + j%10) 誕生日おめでとうございます++; } } out.println(誕生日おめでとうございます); } public static void main(String[] args) { long start = System.currentTimeMillis(); solve(); out.flush(); long end = System.currentTimeMillis(); //trace(end-start + "ms"); in.close(); out.close(); } static void trace(Object... o) { System.out.println(deepToString(o));} }