res = 0
for i in range(14614, 26601):
if str(6) in str(i):
if not str(1) in str(i):
print i
res = res + 1
print res