using System; using System.Collections.Generic; using System.Linq; static public class Program { static public void Main() { readEOF(); var cnt = 0; for (var d = new DateTime(2015,1,1); d.Year<=2015; d=d.AddDays(1)) { if (d.Month == d.Day.ToString().Select(x => x - '0').Sum()) cnt++; } Console.WriteLine(cnt); } static void readEOF() { if (Console.In.Peek() >= 0) throw new Exception("invalid input too long input file"); } }