吃饭喝酒的时候玩的游戏,7的倍数或含7就敲桌子,其它情况报数

n = int(input())
res = 0
for i in range(7, n + 1):
    if i % 7 == 0 or "7" in str(i):
        res += 1
print(res)