N = gets.to_i M = [] (0 .. N).each do |i| (0 .. N).each do |j| M << 2 ** i * 5 ** j end end puts M.sort