# coding: utf-8 # yukicoder No.311 z in FizzBuzzString N = int(input()) # 15の倍数をちょうどダブって数えてるのでこれでよい z_num = (N // 3 + N // 5) * 2 print(z_num)