# -*- coding: utf-8 -*- """ No.311 z in FizzBuzzString https://yukicoder.me/problems/no/311 """ import sys from sys import stdin input = stdin.readline def solve(N): fizz = N // 3 buzz = N // 5 return fizz * 2 + buzz * 2 def main(args): N = int(input()) ans = solve(N) print(ans) if __name__ == '__main__': main(sys.argv[1:])