N = int(input()) four = N//15 san = N//3 go = N//5 two = san + go - four print(2*two + 2*four)