s = "" 1.upto(60) do |i| s += i.to_s end puts s[gets.to_i - 1]