using System; using System.Linq; namespace ConsoleApp1 { class Program { static void Main(string[] args) { //var rl = Console.ReadLine().Split(' '); //var s = int.Parse(rl[0]); //var f = int.Parse(rl[1]); var start = new DateTime(2015, 1, 1); var end = new DateTime(2015, 12, 31); int result = 0; for (var day = start; day <= end; ) { var ten = day.Day / 10; var one = day.Day % 10; if(day.Month == ten + one) { result++; } day = day.AddDays(1); } Console.WriteLine($"{result}"); } } }