string = input() n = int(string) count = 0 num3 = n//3 num5 = n//5 num15 = n//15 print(num3+num5)