Problem:


Score : 300 points

Problem Statement

Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.

Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:

Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.

For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure.
If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward.
Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.

Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Constraints

1 ≦ x ≦ 10^{15}

x is an integer.

Input

The input is given from Standard Input in the following format:

x

Output

Print the answer.

Sample Input 1

7

Sample Output 1

2

Sample Input 2

149696127901

Sample Output 2

27217477801



Sample input:
7


Sample output:
2

Submission status: Accepted

Solution code:
x = int(input())

if 6 < x < 11:
    print(2)
    exit()
elif 1 <= x <= 6:
    print(1)
    exit()

if x % 11 == 0:
    print((x // 11) * 2)
else:
    num = (x // 11) * 2
    amari = x % 11
    if 0 <= amari <= 6:
        print(num + 1)
    else:
        print(num + 2)

Submission status: Accepted

Solution code:
N = int(input()) 
num = N // 11
res = num * 2
k = num * 11
if 0< N % 11 <= 6:
  res +=  1
elif 7<= N % 11 <= 10:
  res +=  2
else:
  pass  
print(res)

Submission status: Accepted

Solution code:
x = int(input())

cnt = 2 * (x // 11)
cnt += (0 if x % 11 == 0 else 1 if x % 11 <= 6 else 2)

print(cnt)

Submission status: Accepted

Solution code:
x = int(input())

if x % 11 == 0:
    print((x // 11) * 2)
elif x % 11 <= 6:
    print((x // 11) * 2 + 1)
else:
    print((x // 11) * 2 + 2)

Submission status: Accepted

Solution code:
N=int(input())
c=(N+10)//11
print(2*c-((N+10)%11<6))

Submission status: Accepted

Solution code:
x = int(input())
n = (x // 11) * 2
r = x % 11
if 0 < r <= 6:
    n += 1
elif r > 6:
    n += 2
print(n)

Submission status: Accepted

Solution code:
x = int(input())
ans = (x//11)*2
x %= 11
if x==0:
    pass
elif x<7:
    ans += 1
else:
    ans += 2
print(ans)

Submission status: Accepted

Solution code:
x=int(input())
if x%11==0:
    print(x//11*2)
elif x%11<=6:
    print(x//11*2+1)
else:
    print(x//11*2+2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
if x <= 6:
    print(1)
    exit()
cnt = (x//11)*2
x %= 11
if x <= 0:
    print(cnt)
elif x <= 6:
    print(cnt+1)
else:
    print(cnt+2)

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array

# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
# from decimal import Decimal
# from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
INF = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    d, m = divmod(N, 11)
    ret = d * 2
    if m == 0:
        print(ret)
    elif m >= 7:
        print(ret + 2)
    else:
        print(ret + 1)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x=int(input())
kai=x//11
amari=x%11

if 1<=amari<=6:
  print(2*kai+1)
elif 7<=amari<=10:
  print(2*kai+2)
else:
  print(2*kai)

Submission status: Accepted

Solution code:
x=int(input())
ans = (x//11)*2
if 0 < x%11 <= 6:
    ans += 1
elif x % 11 > 6:
    ans += 2
print(ans)

Submission status: Accepted

Solution code:
x=int(input())
a=x%11
if a==0:
    res=0
elif a<7:
    res=1
else:
    res=2
print((x//11)*2 + res)

Submission status: Accepted

Solution code:
x = int(input())
ans = x // 11
ans *= 2

m = x % 11
if m >= 7:
    ans += 2
elif m >= 1:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
x = int(input())
res = (x // 11) * 2
x %= 11
if x == 0:
  print(res)
elif 1 <= x <= 6:
  print(res + 1)
else:
  print(res + 2)

Submission status: Accepted

Solution code:
n = int(input())

ans = (n // 11) * 2

rem = n % 11

if rem > 0 :
    if rem <= 6:
        ans += 1
    else:
        ans += 2

print(ans)

Submission status: Accepted

Solution code:
import math

url = "https://atcoder.jp//contests/abc057/tasks/abc057_c"

def main():
    x = int(input())
    ans, div = divmod(x, 11)
    ans *= 2
    ans += math.ceil(div/6)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())
p, q = divmod(x-1, 11)
print(p*2+1 if q < 6 else p*2+2)

Submission status: Accepted

Solution code:
x=int(input())

ans=(x//11)*2
if x%11==0:
    pass
elif 0<x%11<=6:
    ans+=1
else:
    ans+=2
print(ans)

Submission status: Accepted

Solution code:
x = int(input())

ans = (x // 11) * 2
c = x % 11
if c == 0:
    print(ans)
elif c <= 6:
    print(ans + 1)
else:
    print(ans + 2)

Submission status: Accepted

Solution code:
x = int(input())
a = x // 11
b = x % 11
if b == 0:
    print(2*a)
elif b <= 6:
    print(2*a+1)
else:
    print(2*a+2)

Submission status: Accepted

Solution code:
x = int(input())
  
n = (x // 11) * 2
remain = x % 11

if remain > 0:
  if remain <= 6:
    n += 1
  else:
    n += 2
    
print(n)

Submission status: Accepted

Solution code:
x=int(input())
print(x//11*2+(x%11>0)+(x%11>6))

Submission status: Accepted

Solution code:
x=int(input())
if x<=6:
    print(1)
elif x<=11:
    print(2)
elif x%11==0:
    print(2*(x//11))
elif x%11<=6:
    print(2*(x//11)+1)
else:
    print(2*(x//11)+2)

Submission status: Accepted

Solution code:
x = int(input())

'''
if x <= 6:
    print(1)
'''
judge = x%11
#print(judge)
ans = 0
if judge == 0:
    ans = 2*(x//11)
elif judge > 6:
    ans = 2*(x//11)+2
else:
    ans = 2*(x//11)+1

print(ans)

Submission status: Accepted

Solution code:
#
# abc053 b
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """7"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """149696127901"""
        output = """27217477801"""
        self.assertIO(input, output)


def resolve():
    x = int(input())
    ans = x//11 * 2
    if 1 <= x % 11 <= 6:
        ans += 1
    elif x % 11 >= 7:
        ans += 2
    print(ans)


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

Solution code:
x = int(input())
if x % 11 == 0:
    print((x//11)*2)
elif x % 11 <= 6:
    print((x//11)*2+1)
else:
    print((x//11)*2+2)

Submission status: Accepted

Solution code:
x=int(input())
print((x//11)*2+(x%11>0)+(x%11>6))

Submission status: Accepted

Solution code:
x = int(input())
loopn = (x//11) * 2
rm = x % 11
if rm == 0:
    pass
elif rm <= 6:
    loopn += 1
else:
    loopn += 2
print(loopn)

Submission status: Accepted

Solution code:
# C - X: Yet Another Die Game
def main():
    x = int(input())

    if x%11==0:
        print((x//11)*2)
    elif x%11<=6:
        print((x//11)*2+1)
    else:
        print((x//11)*2+2)
  
        
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def getValue(mid):
    return (mid // 2) * 6 + (mid // 2) * 5 + 6 * (bool(mid % 2))

n = int(input())
l, r = 1, 10 ** 15
result = float("inf")
while l <= r:
    mid = (l + r) // 2
    cur = getValue(mid)
    if cur >= n:
        result = mid
        r = mid - 1
    else:
        l = mid + 1
print(result)

Submission status: Accepted

Solution code:

def main():
    import math
    x = int(input())

    k_11 = math.ceil(x / 11)
    if 11*k_11 -5 >= x:
        print(2*k_11 - 1)
    else:
        print(2*k_11)




if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()


def main():
    x = int(input())
    time, rem = x // 11, x % 11
    if 0 < rem <= 6:
        print(time * 2 + 1)
    elif 6 < rem:
        print(time * 2 + 2)
    else:
        print(time * 2)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#１回目の操作で最低5点、2回目以降は6点と5点を繰り返す
x = int(input())
#print(x,'/',11,x//11,x%11)
#print(x,'/',5,x//5,x%5)

tmp1 = x//11
tmp2 = (x%11)//6
tmp3 = (x%11)%6
if tmp3 > 0:
    print(tmp1*2+tmp2+1)
else:
    print(tmp1*2+tmp2)

Submission status: Accepted

Solution code:
#!/usr/bin/env python

x = int(input())
t = x-11*(x//11)
if t <= 6:
    if x%11 != 0:
        ans = 2*(x//11)+1
    else:
        ans = 2*(x//11)
else:
    if x%11 != 0:
        ans = 2*(x//11)+2
    else:
        ans = 2*(x//11)+1
print(ans)

Submission status: Accepted

Solution code:
import math
x=int(input())
div,mod=divmod(x,11)
alpha=math.ceil(mod/6)
print(div*2+alpha)

Submission status: Accepted

Solution code:
x = int(input())

if x%11==0:
    print((x//11)*2)
elif x%11<=6:
    print((x//11)*2+1)
else:
    print((x//11)*2+2)

Submission status: Accepted

Solution code:
n=int(input())
a = n//11
b = n%11

if b == 0:
    print(a*2)
if 1 <= b <= 6:
    print(a*2+1)
if 7 <= b < 11:
    print(a*2+2)

Submission status: Accepted

Solution code:
x = int(input())
 
ans = (x//11)*2
remainder = x%11
if remainder == 0:
    print(ans)
elif 1 <= remainder <= 6:
    print(ans+1)
else:
    print(ans+2)

Submission status: Accepted

Solution code:
x = int(input())

ans = (x // 11) * 2
if 0 < x % 11 < 7:
    ans += 1
elif 6 < x % 11:
    ans += 2

print(ans)

Submission status: Accepted

Solution code:
n = int(raw_input())
print 2 * (n / 11) + (n % 11 + 5) / 6

Submission status: Accepted

Solution code:
n = int(raw_input())
h = {0:0}
for i in range(1, 6+1): h[i] = 1
for i in range(7, 12): h[i] = 2
print 2 * (n / 11) + h[n % 11]

Submission status: Accepted

Solution code:
n = int(raw_input())


c = 2 * (n / 11)
h = {0:0}
for i in range(1, 6+1):
	h[i] = 1
for i in range(7, 12):
	h[i] = 2
if n in h:
	print h[n]
else:
	print h[n % 11] + c

Submission status: Accepted

Solution code:
x=int(input())
a=x//11
b=x%11
if b==0:
  print(2*a)
elif 1<=b<=6:
  print(2*a+1)
else:
  print(2*a+2)

Submission status: Accepted

Solution code:
X = int(input())
Count = 2*(X//11)
RestX = X-11*(X//11)
print(Count+[0,1,2][(RestX>=1)+(RestX>=7)])

Submission status: Accepted

Solution code:
x=int(input())
a=x//11*2
b=x%11
print(a if b==0 else a+1 if b<7 else a+2)

Submission status: Accepted

Solution code:
x = int(input())
a = x // 11 * 2
b = x % 11

if 0 < b <= 6:
    a += 1
elif b > 6:
    a += 2

print(a)

Submission status: Accepted

Solution code:
x=int(input())
y=19

ans=0
ans+=(x//11)*2
cnt=x%11
if cnt>=7:
  ans+=2
elif cnt>=1:
  ans+=1
  
print(ans)

Submission status: Accepted

Solution code:
x = int(input())

cnt = (x // 11) * 2
if x % 11 == 0:
  print(cnt)
elif x % 11 <= 6:
  print(cnt + 1)
else:
  print(cnt + 2)

Submission status: Accepted

Solution code:
x = int(input())
print(2 * (x // 11) + ((x % 11 - 1) // 6 + 1))

Submission status: Accepted

Solution code:
x = int(input())

q = x // 11
r = x % 11
if r == 0:
    ans = q * 2
elif r < 7:
    ans = q * 2 + 1
else:
    ans = q * 2 + 2
print(ans)

Submission status: Accepted

Solution code:
x = int(input())
 
ans = (x//11)*2
remainder = x%11
if remainder == 0:
    print(ans)
elif 1 <= remainder <= 6:
    print(ans+1)
else:
    print(ans+2)

Submission status: Accepted

Solution code:
x = int(input())

ans = (x//11)*2
remainder = x%11
if remainder == 0:
    print(ans)
elif 1 <= remainder <= 6:
    print(ans+1)
else:
    print(ans+2)

Submission status: Accepted

Solution code:
x=int(input())

q,r = divmod(x,11)

if r==0:a=0
elif r <= 6:a = 1
else:a = 2
  
print(2*q+a)

Submission status: Accepted

Solution code:
x = int(input())
count = 0
count = (x // 11)*2
if x % 11 == 0:
    count += 0
elif x % 11 <= 6:
    count += 1
else:
    count += 2
print(count)

Submission status: Accepted

Solution code:
# 6, 5, 6, 5, ...

x = int(input())
q = x // 11
r = x % 11
if r == 0:
    ans = q * 2
elif 1 <= r <= 6:
    ans = q * 2 + 1
elif 7 <= r <= 10:
    ans = q * 2 + 2
print(ans)

Submission status: Accepted

Solution code:
x = int(input())
q, mod = divmod(x, 11)
print(q * 2 + (mod + 6 - 1) // 6)

Submission status: Accepted

Solution code:
from math import ceil
x = int(input())
q, mod = divmod(x, 11)
print(q * 2 + ceil(mod / 6))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
 
ans = x//11*2
t = x%11
if t > 6: 
    ans += 2
elif t > 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
x = int(input())

ans = x//11*2
t = x%11
if t > 6: ans += 2
elif t > 0: ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys
import math
x=int(input())
if not ( 1 <= x <= 10**15 ): sys.exit()

print(math.ceil(((x-6)/11)*2)+1)

Submission status: Accepted

Solution code:
x = int(input())
quotient = x // 11
x -= quotient * 11
ans = quotient * 2
if x == 0:
  print(ans)
elif x <= 6:
  print(ans+1)
elif x <= 11:
  print(ans+2)

Submission status: Accepted

Solution code:
x = int(input())
ans = (x // 11) * 2

if x % 11 > 6:
    ans += 2
elif x % 11 > 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
p, q = divmod(int(input()), 11)
print(p*2 + (q and [1, 2][q > 6]))

Submission status: Accepted

Solution code:
x = int(input())
num = (x - 1) // 11 * 2 + 1
if x % 11 > 6 or x % 11 == 0:
    num += 1
print(num)

Submission status: Accepted

Solution code:
x = int(input())
print(x//11*2+((x-x//11*11-1)//6+1))

Submission status: Accepted

Solution code:
x=int(input())
ans=2*(x//11)
x-=(ans//2)*11
if 0<x<=6:
    ans+=1
elif x==0:
    pass
else:
    ans+=2
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
k=N//11
s=N-(k*11)
if s==0:
  print(k*2)
elif s<=6:
  print(2*k+1)
else:
  print(2*k+2)

Submission status: Accepted

Solution code:
x=int(input())
a=(x//11)*2
print(a if x%11==0 else a+1 if x%11<7 else a+2)

Submission status: Accepted

Solution code:
x = int(input())

s = x // 11
t = x % 11
if t > 6:
    print(s * 2 + 2)
elif t > 0:
    print(s * 2 + 1)
else:
    print(s * 2)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n=int(input())
cnt=n//11
cnt*=2
if 0<n%11<=6:
    cnt+=1
elif n%11>6:
    cnt+=2
print(cnt)

Submission status: Accepted

Solution code:
x=int(input())
c=x//11*2
m=x%11
if m==0:print(c)
elif m<=6:print(c+1)
else:print(c+2)

Submission status: Accepted

Solution code:
import math
x = int(input())
if x == 6 or (x-6)%11 == 0:
  x -= 1  
print(math.ceil(x/5.5))

Submission status: Accepted

Solution code:
x = int(input())

if x % 11 == 0:
    print(2 * (x // 11))
elif 1 <= x % 11 <= 6:
    print(2 * (x // 11) + 1)
else:
    print(2 * (x // 11) + 2)

Submission status: Accepted

Solution code:
n = int(input())
tot = n//11
rem = n%11
tot = tot*2
if rem==0:
	print(tot)
elif rem<=6:
	print(tot+1)
else:
	print(tot+2)

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline().rstrip())

x = I()

q = (x-1)//11
r = (x-1) % 11
print(2*q+1 if r <= 5 else 2*q+2)

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline().rstrip())

x = I()

q = x//11
r = x % 11
if r == 0:
    print(2*q)
elif 1 <= r <= 6:
    print(2*q+1)
else:
    print(2*q+2)

Submission status: Accepted

Solution code:
x = int(input())

if x <= 6:
    ans = 1
elif 6 < x < 11:
    ans = 2
elif x%11 == 0:
    ans = (x//11)*2
else:
    ans = (x//11)*2
    x = x%11
    if x <= 6:
        ans += 1
    else:
        ans += 2

print (ans)

Submission status: Accepted

Solution code:
def main():
    x = int(input())
    if (x % 11) == 0:
        ans = (x // 11) * 2
    else:
        if x % 11 <= 6:
            ans = (x // 11) * 2 + 1
        else:
            ans = (x // 11) * 2 + 2
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x=int(input())
ans,mod=divmod(x,11)
ans*=2
if mod>6:
    ans+=2
elif mod>0:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    x = int(readline())

    ans = x // 11 * 2
    x %= 11
    if 0 < x <= 6:
        ans += 1
    elif x > 6:
        ans += 2

    print(ans)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())
ans = 0
if x % 11 == 0:
    print(2 * (x // 11))
else:
    if x % 11 <= 6:
        print(2 * (x // 11) + 1)
    else:
        print(2 * (x // 11) + 2)

Submission status: Accepted

Solution code:
x=int(input())
 
p=x//11
q=x%11
q2=q-6
 
if q==0:
  print(2*p)
elif q2<=0:
  print(2*p+1)
else:
  print(2*p+2)

Submission status: Accepted

Solution code:
x = int(input())

N = 2*(x//11)

if x % 11 ==0:
    pass
elif x % 11 <= 6:
    N += 1
else:
    N += 2
    
print(N)

Submission status: Accepted

Solution code:
print((9+2*int(input()))//11)

Submission status: Accepted

Solution code:
import math
def main():
    x = int(input())
    if(x>6):
        res = 1
    if(x%11<=6 and x%11!=0):
        a = math.ceil((x+5)/11)
        b = a-1
        print(a+b)
    else:
        a=math.ceil((x)/11)
        b=a
        print(a+a)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
x = int(input())

ans = (x//11) * 2

x %= 11

if x == 0:
    print(ans)
elif x <= 6:
    print(ans+1)
else:
    print(ans+2)

Submission status: Accepted

Solution code:
x=int(input())
num1=(x//11)*2
num2=x%11
if num2>=7:
    num1+=2
elif num2!=0:
    num1+=1
print(num1)

Submission status: Accepted

Solution code:
x = int(input())
if x <= 6:
    print(1)
elif x % 11 == 0:
    print((x // 11)*2)
elif x % 11 <= 6:
    print((x // 11)*2 + 1)
else:
    print((x // 11)*2 + 2)

Submission status: Accepted

Solution code:


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    """
    6 5 6 5
    """
    x = read_int()
    answer = (x//11)*2
    if x%11 > 6:
        answer += 2
    elif x%11 > 0:
        answer += 1
    return answer


if __name__ == '__main__':
    print(solve())

Submission status: Accepted

Solution code:
x = int(input())
cnt = (x-1) // 11
mod = (x-1) % 11

if mod <= 5:
  ans = 2 * cnt + 1
else:
  ans = 2 * cnt + 2
print(ans)

Submission status: Accepted

Solution code:
def main():
    x = int(input())
    cnt = x // 11 * 2
    rem = x % 11
    if rem > 6:
        cnt += 2
    elif rem > 0:
        cnt += 1

    print(cnt)

if  __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    x = I()
    ans = (x//11)*2
    t = x%11
    if t == 0:
        pass
    elif t >= 1 and t <= 6:
        ans += 1
    else:
        ans += 2
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = int(input())
count = 0

# 考え：初めに５の面を上にし、６、５、６、５の面を繰り返し上にしていくと良さそう
# 方針：while中、奇数回目にsから６を引く、偶数回目にsから５を引くことを繰り返す計算を行う

# この方法だとsが大きい場合、計算に時間がかかる
"""
while s > 0:
    if count == 0 or count % 2 != 0:
        s = s - 6
    else:
        s = s - 5

    count += 1
"""

# 方針：6、5、6、5...の繰り返しなので11で割った商と
#       余りが6以下なら1回サイコロを動かし、11以外なら2回動かせば良い

count = s // 11 * 2

if s % 11 == 0:
    pass
elif s % 11 <= 6:
    count += 1
else:
    count += 2

print(count)

Submission status: Accepted

Solution code:
import math
x = int(input())

if x<=6:
    print(1)
elif x<=11:
    print(2)
else:
    ans = (x//11)*2
    res = (x%11)
    if res==0:
        res =0
    elif res<=6:
        res = 1
    elif res<=11:
        res = 2
    print(ans+res)

Submission status: Accepted

Solution code:
N=int(input())
ans1=N//11*2
ans2=(0<N%11)+(6<N%11)
print(ans1+ans2)

Submission status: Accepted

Solution code:
x = int(input())

a = x//11
b = x%11
if b == 0: print(2*a)
elif b > 6: print(2*a+2)
else: print(2*a+1)

Submission status: Accepted

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n = i_input()

    n += 4

    print(n//11*2 + (n%11>4))
 
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())

ans = int(x/11)*2
tmp = x%11
if tmp > 6:
    ans+=2
elif tmp > 0:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
x = int(input())
X = x % 11
N = x // 11

ans = 0
if 1 <= X <= 6:
    ans = N*2 + 1
elif 7 <= X <= 10:
    ans = N*2 + 2
else:
    ans = N*2

print(ans)

Submission status: Accepted

Solution code:
from math import ceil
x = int(input())
print(2 * (x // 11) + ceil(x % 11 / 6))

Submission status: Accepted

Solution code:
import sys;input = lambda : sys.stdin.readline()
n = int(input())
div,mod=divmod(n,11)
print(div*2 if mod==0 else (div*2+1 if mod<=6 else div*2+2))

Submission status: Accepted

Solution code:
n=int(input())

x=n//11
y=n%11
if y==0:
  y=0
elif y<7:
  y=1
else:
  y=2

print(x*2+y)

Submission status: Accepted

Solution code:
x=int(input())
c=2*((x-1)//11)
#print(c)
y=x-11*c//2
#print(y)
if y<=6:
    ans=c+1
else:
    ans=c+2
print(ans)

Submission status: Accepted

Solution code:
x=int(input())

quo=x//11
rst=x%11

if rst==0:
    ans=quo*2
elif rst<=6:
    ans=(quo*2)+1
else:
    ans=(quo*2)+2

print(ans)

Submission status: Accepted

Solution code:
x=int(input())
ans=0
if x%11==0:
  print(2*(x//11))
else:
  if x%11<=6:
    print(2*(x//11)+1)
  else:
    print(2*(x//11)+2)

Submission status: Accepted

Solution code:
N = int(input())
ans = N // 11 * 2
N %= 11
if N == 0:
    print(ans)
elif N <= 6:
    print(ans+1)
else:
    print(ans+2)

Submission status: Accepted

Solution code:
x = int(input())
n, r = divmod(x, 11)
print(2*n + (0<r) + (6<r))

Submission status: Accepted

Solution code:
x = int(input())
n = x // 11
x %= 11
if x == 0:
    print(2 * n)
else:
    print(2 * n + (x - 1) // 6 + 1)

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    x = int(readline())
    ans = 2 * (x // 11)
    if x % 11 == 0:
        pass
    elif x % 11 <= 6:
        ans += 1
    else:
        ans += 2

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())+4
print(n//11*2+(n%11>4))

Submission status: Accepted

Solution code:
n=int(input())
d,m=divmod(n-6,11)
if m<1: print(d*2+1)
elif m<6: print(d*2+2)
else: print(d*2+3)

Submission status: Accepted

Solution code:
x = int(input())

s = x // 11
a = x % 11
#print(s, a)
if 1 <= a <=6:
  print(2*s + 1)
elif 7 <= a < 11:
  print(2*s + 2)
elif a == 0:
  print(2*s)

Submission status: Accepted

Solution code:
x = int(input())

ans = x // 11 * 2
if 0 < x % 11 <= 6:
    ans += 1
elif 6 < x % 11:
    ans += 2
print(ans)

Submission status: Accepted

Solution code:
x = int(input())
if x > 11:
    if x % 11 == 0:
        print((x//11) * 2)
    elif x % 11 < 7:
        print((x//11) * 2 + 1)
    else:
        print((x//11) * 2 + 2)

elif x < 7:
    print(1)
    
else:
    print(2)

Submission status: Accepted

Solution code:
x = int(input())

cnt = x // 11
mod = x % 11
cnt *= 2
if 0 < mod <= 6:
   cnt += 1
elif mod > 6:
   cnt += 2
print(cnt)

Submission status: Accepted

Solution code:
x = int(input())

ans = 0 - -x//11

if ans*11 - 5 >= x:
    ans = ans*2 - 1
else:
    ans *= 2

print(ans)

Submission status: Accepted

Solution code:
N=int(input())

a=N//11
b=N%11


count=0
count+=2*a
if 0<b and b<=6:
    count+=1
elif 6<b:
    count+=2

print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 11 17:09:47 2020

@author: sd18016
"""   

x = int(input())

if x <= 6:
    print("1")
elif x <= 11:
    print("2")
else:
    a = x // 11
    b = x % 11
    if b == 0:
        print(2*a)
    elif b > 6:
        print(2*a+2)
    else:
        print(2*a+1)

Submission status: Accepted

Solution code:
x = int(input())
p = int(x/11)
x -= p*11
if x == 0:
    print(2*p)
elif x >6:
    print(2*p+2)
else:
    print(2*p+1)

Submission status: Accepted

Solution code:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    x=int(readline())

    n=x//11
    m=x%11
    if m==0: print(2*n)
    elif 1<=m<=6: print(2*n+1)
    else: print(2*n+2)

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
x = int(input())

# x = 149696127901
def calculate(x):

    if x <= 6:
        return 1

    a = x // 11
    mod = x % 11

    if mod == 0:
        return 2*a

    if mod >= 7:
        return 2*a + 2

    return 2*a + 1



res = calculate(x)

print(res)

Submission status: Accepted

Solution code:
x = int(input())
 
ans = x//11*2

if x%11 > 6:
    ans += 2
elif x%11>0:
	ans += 1

print(ans)

Submission status: Accepted

Solution code:
x = int(input())
#2回で3~11を作れる
count = 0
if x == 7:
  count=2
  x = 0
count += (x//11)*2
x = x%11
if x==0:
  count += 0
elif x>6:
  count+=2
else:
  count += 1
print(count)

Submission status: Accepted

Solution code:
X = int(input())
r = 0 if (X % 11) % 6 == 0 else 1
print((X // 11) * 2 + (X % 11) // 6 + r)

Submission status: Accepted

Solution code:
x = int(input())
count = 0

if 6 < x <= 11:
	print(2)
elif x <= 6:
	print(1)
else:
	initcount = x // 11
	if initcount:
		count += initcount*2
		x -= initcount * 11
		mod = x % 11
		if 6 < mod <= 11:
			count += 2
		elif 0 < mod <= 6:
			count += 1
		else:
			pass
		print(count)

Submission status: Accepted

Solution code:
x=int(input())
large_approach=x//11
short_approach=x%11

if short_approach==0:
  print(large_approach*2)
elif short_approach<=6:
  print(large_approach*2+1)
else:
  print(large_approach*2+2)

Submission status: Accepted

Solution code:
x = int(input())
ans =(x//11)*2
if x%11 > 6:
    ans += 2
elif x%11 != 0:
    ans +=1
print(ans)

Submission status: Accepted

Solution code:

x = int(input())
 
def calc(n):
  if n == 0:
    return 0
  elif n < 7:
    return 1
  elif n < 12:
    return 2
  else:
    return (n // 11)*2 + calc(n % 11)

print(calc(x))

Submission status: Accepted

Solution code:
x = int(input())
x11 = x/11
num = [1,2,3,4,5,6]
num2= [7,8,9,10]

if x in num:
  print(1)
  exit()
elif x in num2:
  print(2)
  exit()

elif int(x11) == x11:
  print(int(x11)*2)
  exit()
elif x > int(x11)*11 + 6:
  print(int(x11)*2 +2)
  exit()
else:
  print(1+int(x11)*2)
  exit()

Submission status: Accepted

Solution code:
x = int(input())

def calc(n):
  if n == 0:
    return 0
  elif n < 7:
    return 1
  elif n < 12:
    return 2
  else:
    return (n // 11)*2 + calc(n % 11)

print(calc(x))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    d = (N + 10) // 11
    if 11 * d - 5 >= N:
        print(2 * d - 1)
    else:
        print(2 * d)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#C
x = int(input())
ans = x//11

if x - 11*ans > 6:
    print(2*ans+2)
elif x - 11*ans == 0:
    print(2*ans)
else:
    print(2*ans+1)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
x=I()
base=2*(x//11)
if x%11==0:
    print(base)
elif x%11<=6:
    print(base+1)
else:
    print(base+2)

Submission status: Accepted

Solution code:
def main():
    x = int(input())
    ans, r = divmod(x, 11)
    if r == 0:
        print(2 * ans)
    elif 1 <= r <= 6:
        print(2 * ans + 1)
    else:
        print(2 * ans + 2)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())
ans = (x // 11) * 2
if x % 11 > 6:
    ans += 2
elif x % 11:
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
x = int(input())
result = (x-1)//11*2+1
if (x-1)%11 >5:
  result += 1
  
print(result)

Submission status: Accepted

Solution code:
X = int(input())

q, r = divmod(X, 11)

if r == 0:
    output = q * 2
elif r <= 6 :
    output = q * 2 + 1
else :
    output = q * 2 + 2

print(output)

Submission status: Accepted

Solution code:
x = int(input())

if x % 11 == 0:
    ans = (x // 11) * 2
elif x % 11 <= 6:
    ans = (x // 11) * 2 + 1
else:
    ans = (x // 11) * 2 + 2

print(ans)