num = int(raw_input()) fnum = num zcnt = 0 while num > 0: if num % 3 == 0: zcnt = zcnt + 2 if num % 5 == 0: zcnt = zcnt + 2 num -= 1 print str(zcnt)