X = int(eval(input()))



d, m = divmod(X, 11)



ans = 2 * d

if m > 6:

    ans += 2

elif m > 0:

    ans += 1



print(ans)
X = int(eval(input()))

d, m = divmod(X, 11)



d *= 2

if m > 6:

    d += 2

elif m > 0:

    d += 1

print(d)
X = int(eval(input()))
d, m = divmod(X, 11)
ans = 2 * d
if m > 6:
    ans += 2
elif m > 0:
    ans += 1
print(ans)

X = int(eval(input()))
d, m = divmod(X, 11)
d *= 2
if m > 6:
    d += 2
elif m > 0:
    d += 1
print(d)

-ans = 2 * d +d *= 2 -    ans += 2 +    d += 2 -    ans += 1 -print(ans) +    d += 1 +print(d)