别用我这种做法

for i in range(1,int(input())+1):
    if i % 4 != 0 and "4" not in str(i):
        print(i)