import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int count = 0; for (int i=1; i<=12; i++) { if (i==2) { //-28 for (int j=1; j<=28; j++) { int temp = 0; if (j>=10) { temp = j/10 + j%10; } else { temp = j; } if (i==temp) {count++;} } } else if (i==4 || i==6 || i==9 || i==11) { //-30 for (int j=1; j<=30; j++) { int temp = 0; if (j>=10) { temp = j/10 + j%10; } else { temp = j; } if (i==temp) {count++;} } } else { //-31 for (int j=1; j<=31; j++) { int temp = 0; if (j>=10) { temp = j/10 + j%10; } else { temp = j; } if (i==temp) {count++;} } } } System.out.println(count); } }