N = gets.to_i FizzBuzzString = [] N.times do |i| t = i + 1 if t % 3 == 0 && t % 5 == 0 FizzBuzzString << "FizzBuzz" elsif t % 3 == 0 FizzBuzzString << "Fizz" elsif t % 5 == 0 FizzBuzzString << "Buzz" else FizzBuzzString << t end end pp FizzBuzzString.join.count('z')