public class HappyDay { public static void main(String[] args) { int[] month = {31,28,31,30,31,30,31,31,30,31,31,30,31}; int count = 0; for(int m = 1; m <= 12; m++){ for(int d = 0; d < month[m-1]; d++){ if(m == d / 10 + d % 10){ count++; } } } System.out.println(count); } }