import java.util.Calendar; public class no188 { public static void main(String[] args) { int cnt = 0; Calendar calendar = Calendar.getInstance(); calendar.set(2015, 0, 1); while(true){ int month = calendar.get(Calendar.MONTH)+1; int date = calendar.get(Calendar.DATE); int len = String.valueOf(date).length(); if(len==1){ if(month==date){ cnt++; } } if(len==2){ if(month==((date/10)+(date%10))){ cnt++; } } if(month==12&&date==31){ break; } calendar.add(Calendar.DATE,1); } System.out.println(cnt); } }