require 'date' a=DateTime.new(2015, 1, 1,0,0,0) ans=0 while a.year == 2015 b=a.month c=a.day if b== c/10+c%10 ans+=1 end a+=1 end puts ans