using System; using System.Linq; namespace No188_1{ public class Program{ public static void Main(string[] args){ const int year = 2015; var date = new DateTime(year, 1, 1); var happyDays = 0; for(var i = 0; i < 365 + (DateTime.IsLeapYear(year) ? 1 : 0); i++){ var d = date.AddDays(i); if(d.Month == d.Day.ToString().Sum(c => c - '0')) happyDays++; } Console.WriteLine(happyDays); } } }