#!/usr/bin/env python # -*- coding: utf-8 -*- def FizzBuzzString(N): z = 0 for i in range(1,N+1): if i % 15 == 0: z += 4 elif i % 3 == 0: z += 2 elif i % 5 == 0: z += 2 print(z) FizzBuzzString(int(input()))