require 'date' p (Date.parse("2015-01-01")..Date.parse("2015-12-31")).filter {|x| x.month == x.day.to_s.chars.map(&:to_i).sum}.size