n = int(input())
for i in range(1, n + 1):
c = 0
if i % 2 == 0:
c += 1
if i % 3 == 0:
c += 1
if i % 5 == 0:
c += 1
if i % 7 == 0:
c += 1
if c >= 2:
print(i)
/**************************************************************
Problem: 1746
User: admin
Language: Python
Result: Accepted
Time:110 ms
Memory:34480 kb
****************************************************************/