inputer =int(input())
three_num = int(inputer/3)
five_num = int(inputer/5)
fifteen_num= int(inputer/5)

two_count = three_num+five_num-2*fifteen_num

counter = int(two_count*2+fifteen_num*4)
print(counter)