a = int(eval(input()))

count = 0

if a % 11 < 7 and a % 11 != 0:

    count += 1

elif a % 11 != 0:

    count += 2

count += (a // 11) * 2

print(count)

a = int(eval(input()))

x = (a // 11) * 2

if a % 11 > 6:

    x += 2

elif a % 11 > 0:

    x += 1

print(x)
a = int(eval(input()))
count = 0
if a % 11 < 7 and a % 11 != 0:
    count += 1
elif a % 11 != 0:
    count += 2
count += (a // 11) * 2
print(count)

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

-count = 0 -if a % 11 < 7 and a % 11 != 0: -    count += 1 -elif a % 11 != 0: -    count += 2 -count += (a // 11) * 2 -print(count) +x = (a // 11) * 2 +if a % 11 > 6: +    x += 2 +elif a % 11 > 0: +    x += 1 +print(x)