n = gets.to_i if 50 <= n puts "0"*12 exit end s = ((1..n).inject :*).to_s a=[0, s.size - 12].max puts s[a...[s.size, a + 12].min]