d = gets.to_i puts (1 .. 60).inject("0."){|s,v| s + v.to_s }[d + 1]