p,n,y=print,int(input()),2004 p(2000) while y<=n: if y%100!=0: p(y) y+=4