# frozen_string_literal: true n = gets.chomp.to_i p 2 * (Rational(n / 3).to_f.floor + Rational(n / 5).floor)