require'date' p Date.new(2015).upto(Date.new(2016).prev_day).count{|d| d.mon==d.day.divmod(10).inject(:+) }