import sys



x = int(sys.stdin.readline().strip())



"""

1

5423

6

"""



r = x // 11

res = x - 11*r

if res == 0:

    print((2*r))

elif res > 6:

    print((2*r + 2))

else:

    print((2*r + 1))
import sys



x = int(sys.stdin.readline())

n = x // 11

r = x % 11

if r == 0:

    print((2*n))

elif r <= 6:

    print((2*n + 1))

else:

    print((2 * (n+1)))
import sys

x = int(sys.stdin.readline().strip())
"""
1
5423
6
"""
r = x // 11
res = x - 11 * r
if res == 0:
    print((2 * r))
elif res > 6:
    print((2 * r + 2))
else:
    print((2 * r + 1))

import sys

x = int(sys.stdin.readline())
n = x // 11
r = x % 11
if r == 0:
    print((2 * n))
elif r <= 6:
    print((2 * n + 1))
else:
    print((2 * (n + 1)))

-x = int(sys.stdin.readline().strip()) -""" -1 -5423 -6 -""" -r = x // 11 -res = x - 11 * r -if res == 0: -    print((2 * r)) -elif res > 6: -    print((2 * r + 2)) +x = int(sys.stdin.readline()) +n = x // 11 +r = x % 11 +if r == 0: +    print((2 * n)) +elif r <= 6: +    print((2 * n + 1)) -    print((2 * r + 1)) +    print((2 * (n + 1)))