题解 | #挑7#
# 先求7的倍数,再求包含7的个数
while True:
try:
n = int(input())
arr = []
for i in range(1, n + 1):
if i % 7 == 0:
arr.append(i)
elif '7' in str(i):
arr.append(i)
else:
continue
print(len(arr))
except:
break