i = int(input()) cnt = 0 for j in range(1, i+1): print(j) if j % 15 == 0: cnt += 4 elif j % 3 == 0 or j % 5 == 0: cnt += 2 print(cnt)