n=1 while.8**n:n+=1;sum(7279525//ord(c)%4-1for c in'%d'%n)<0!=print(n)