max = gets.to_i if max > 1 for count in 1..max do if count % 3 == 0 && count % 5 == 0 puts "FizzBuzz" elsif count % 3 == 0 puts "Fizz" elsif count % 5 == 0 puts "Buzz" else puts count end end else puts max end