import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { Calendar cl = Calendar.getInstance(); cl.set(2014, 11, 31); int ans = 0; for (int i=0; i<365; i++) { cl.add(Calendar.DATE, 1); int m = cl.get(Calendar.MONTH)+1; int d = cl.get(Calendar.DAY_OF_MONTH); if (m == d/10+d%10) ans++; } System.out.println(ans); } }