csp-201912-1 报数
#判断条件,7的倍数或者包含7
def seven(number):
if number%7==0:
return True
else:
s = str(number)
if '7'in s:
return True
else:
return False
#输入
num = eval(input())
a=b=c=d=0#记录四个人跳过的个数
n = 0#记录报数个数
m = 0
while n!=num:
m +=1
if m%4==1:#甲
if seven(m):
a +=1
else:
n +=1
elif m%4==2:#乙
if seven(m):
b +=1
else:
n+=1
elif m%4==3:#丙
if seven(m):
c +=1
else:
n+=1
else:#丁
if seven(m):
d += 1
else:
n += 1
#输出
print(a)
print(b)
print(c)
print(d)