x = int(eval(input()))

n = x//11

k = x%11

if k==0:

    print((2*n))

elif 0<k<=6:

    print((2*n+1))

else:

    print((2*n+2))
x = int(eval(input()))

n = x//11

a = x%11

if a==0:

    ans = 2*n

elif 1<=a<=6:

    ans = 2*n+1

else:

    ans = 2*n+2

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

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

-k = x % 11 -if k == 0: -    print((2 * n)) -elif 0 < k <= 6: -    print((2 * n + 1)) +a = x % 11 +if a == 0: +    ans = 2 * n +elif 1 <= a <= 6: +    ans = 2 * n + 1 -    print((2 * n + 2)) +    ans = 2 * n + 2 +print(ans)