amount = 0 gets.to_i.times{ amount += gets.to_i } p amount