X=int(eval(input()))

ans=X//11*2

if (X%11==0):

 print(ans)

elif (X%11<=6):

 print((ans+1))

else:

 print((ans+2))

x = int(eval(input()))



if x % 11 == 0:

    print((x // 11 * 2))

elif x % 11 <= 6:

    print((x // 11 * 2 + 1))

else:

    print((x // 11 * 2 + 2))

X = int(eval(input()))
ans = X // 11 * 2
if X % 11 == 0:
    print(ans)
elif X % 11 <= 6:
    print((ans + 1))
else:
    print((ans + 2))

x = int(eval(input()))
if x % 11 == 0:
    print((x // 11 * 2))
elif x % 11 <= 6:
    print((x // 11 * 2 + 1))
else:
    print((x // 11 * 2 + 2))

-X = int(eval(input())) -ans = X // 11 * 2 -if X % 11 == 0: -    print(ans) -elif X % 11 <= 6: -    print((ans + 1)) +x = int(eval(input())) +if x % 11 == 0: +    print((x // 11 * 2)) +elif x % 11 <= 6: +    print((x // 11 * 2 + 1)) -    print((ans + 2)) +    print((x // 11 * 2 + 2))