N = int(eval(input()))



if N < 11:

    d, m = divmod(N, 6)

    print((d + (m>0)))

else:

    d, m = divmod(N, 11)

    a = (1 if m else 0) if m < 7 else 2

    print((d * 2 + a))
N = int(eval(input()))

d, m = divmod(N, 11)

a = (1 if m else 0) if m < 7 else 2

print((d * 2 + a))
N = int(eval(input()))
if N < 11:
    d, m = divmod(N, 6)
    print((d + (m > 0)))
else:
    d, m = divmod(N, 11)
    a = (1 if m else 0) if m < 7 else 2
    print((d * 2 + a))

N = int(eval(input()))
d, m = divmod(N, 11)
a = (1 if m else 0) if m < 7 else 2
print((d * 2 + a))

-if N < 11: -    d, m = divmod(N, 6) -    print((d + (m > 0))) -else: -    d, m = divmod(N, 11) -    a = (1 if m else 0) if m < 7 else 2 -    print((d * 2 + a)) +d, m = divmod(N, 11) +a = (1 if m else 0) if m < 7 else 2 +print((d * 2 + a))