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:
def main():
    x = int(input())
    ans1 = x//11
    ans2 = x - 11*ans1
    ans = (ans1 * 2)
    if ans2 == 0:
        pass
    elif ans2 <= 6:
        ans += 1
    else:
        ans += 2
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
ans = (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())
point = 0
count = int(x / 11)
amari = x % 11
if amari == 0:
    print(count * 2)
elif amari < 7:
    print(count * 2 + 1)
else:
    print(count * 2 + 2)

Submission status: Accepted

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

Submission status: Accepted

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

if x <= 6:
    count = 1
else:
    a, b = divmod(x, 11)
    a *= 2
    if b == 0:
        a += 0
    elif b > 6:
        a += 2
    else:
        a += 1
    count = a

print(count)

Submission status: Accepted

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

print(ret)

Submission status: Accepted

Solution code:
x = int(input())

q, r = divmod(x, 5+6)
if r == 0:
    print(q*2)
elif r <= 6:
    print(q*2+1)
else:
    print(q*2+2)

Submission status: Accepted

Solution code:
X = int(input())
ans = 0
q, mod = divmod(X,11)
#print(q,mod)
if mod == 0:
  ans = q * 2
elif mod <= 6:
  ans = q * 2 + 1
else:
  ans = q * 2 + 2
print(ans)

Submission status: Accepted

Solution code:
x = int(input())

q = x // 11
r = x % 11

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

Submission status: Accepted

Solution code:
x = int(input())

s = x // 11
m = x % 11

if m == 0:
    p = 0
elif m in [1, 2, 3, 5, 4, 6]:
    p = 1
elif m in [7, 8, 9, 10]:
    p = 2
ans = s*2 + p
print(ans)

Submission status: Accepted

Solution code:
x = int(input())
y = x//11
z = x%11

if z > 6:
  print(2*y+2)
elif 1 <= z and z <= 6:
  print(2*y+1)
else:
  print(2*y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
q, mod = divmod(x, 11)

cnt = q * 2
if mod > 6:
    cnt += 2
elif mod > 0:
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

from math import ceil

x = int(input())

q, r = divmod(x, 5 + 6)
ans = 2 * q + ceil(r / 6)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
x = int(stdin.readline().rstrip())
ans = 0
if x <= 6:
    ans = 1
elif x <= 11:
    ans = 2
else:
    ans = (x//11)*2
    if x%11 <= 6:
        ans += 1
        if x%11 == 0:
            ans -= 1
    else:
        ans += 2
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
d,m=divmod(int(input()),11);print(d*2+(m>0)+(m>6))

Submission status: Accepted

Solution code:
from math import ceil
a = int(input())
b, c = divmod(a, 11)
print(b * 2 + ceil(c / 6))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

x = inp()
t = x//11
s = x - t*11
if s == 0:
    print(t*2)
elif s <= 6:
    print(t*2+1)
else:
    print(t*2+2)

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input());print(x//11*2+(0,1,2)[(x%11>6)+(x%11>0)])

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from functools import reduce


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007



x = I()
print(x // 11 * 2 + bool(x % 11) + bool(x % 11 > 6))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

if x % 11 == 0:
  ans = a
elif 1 <= x % 11 < 7:
  ans = a + 1
elif 7 <= x % 11 <=10:
  ans = a + 2

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(x: int):

    ct = (x//11)*2
    m = x%11
    if(m > 6):
        ct += 2
    elif(1 <= m <= 6):
        ct += 1
    
    print(ct)

    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    x = int(next(tokens))  # type: int
    solve(x)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

print(cnt)

Submission status: Accepted

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

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())

tmp = X // 11
ans = 0
ans += tmp * 2

X %= 11

if 1 <= X <= 6:
	ans += 1
elif X > 6:
	ans += 2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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)

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
if N < 7:
    print(1)
    exit()
elif N < 12:
    print(2)
    exit()

if N%11 > 6:
    ans += 2
elif N % 11 < 7 and N % 11 != 0:
    ans += 1
print((N//11)*2+(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

a = (n+10) // 11

if n <= a * 11 - 5:
    print(a*2-1)
else:
    print(a*2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import copy
import string
import  math
from _bisect import *
from collections import *
from operator import itemgetter
from math import factorial
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

x = ni()
ans = x // 11
r = x % 11
ans *= 2
if r == 5 or r > 6:
    ans += 2
elif r > 0:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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)

Submission status: Accepted

Solution code:
X = int(input())
tmp1 = (X//11)*2
tmp2 = X%11
if tmp2>0 and tmp2<7:
    print(tmp1+1)
elif tmp2>6 and tmp2<12:
    print(tmp1+2)
else:
    print(tmp1)

Submission status: Accepted

Solution code:
X = int(input())

cnt = 0

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

Submission status: Accepted

Solution code:
x = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc053/tasks/arc068_a
# C - X: Yet Another Die Game
import math
n = int(input().split()[0])

c = math.floor(n / 11) * 2

if n % 11 == 0:
    pass
elif n % 11 <= 6:
    c += 1
elif n % 11 > 6:
    c += 2

print(int(c))

Submission status: Accepted

Solution code:
# 最初上をむいてる数はなんでもいいっぽいので6と5をこの順番で繰り返し貪欲するのがいい
# 6まで -> 1回 11まで -> 2回 17まで -> 3回 22まで -> 4回  28まで -> 5回...
x = int(input())
if x <= 6:
    print(1)
elif x <= 11:
    print(2)
else:
    print((x // 11) * 2 + (2 if (x % 11) > 6 else 1 if (x % 11) > 0 else 0))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

N = int(input())

two_dices = (N-1) // 11
remain = N % 11
ans = 2 * two_dices
if 1 <= remain <= 6:
    ans += 1
else:
    ans += 2


print(ans)

Submission status: Accepted

Solution code:
x = int(input())

a = x // 11
y = x - 11 * a
if y == 0:
    print(2*a)
elif y < 7:
    print(2*a+1)
else:
    print(2*a+2)

Submission status: Accepted

Solution code:
x=int(input())

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

print(ans)

Submission status: Accepted

Solution code:
x = int(input())

ans = 0
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)

Submission status: Accepted

Solution code:
import math
def main():
    x = int(input())
    count = (x // 11)*2
    if x % 11 == 0:
        return count
    elif x % 11 <= 6:
        return count + 1
    else:
        return count + 2


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    x = inputInt()
    
    ans = (x // 11) * 2
    if x % 11 > 0:
        ans+=1
    if x % 11 > 6:
        ans+=1
    print(ans)
            
            
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
#

import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

def main():
    x = int(input())
    div = x // 11
    mod = x % 11
    if mod == 0:
        add = 0
    elif mod < 7:
        add = 1
    else:
        add = 2
    print(div * 2 + add)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(x: int):
    counter = 2*(x//11)
    if 0 < x % 11 <= 6:
        counter += 1
    elif 6 < x % 11:
        counter += 2
    print(counter)

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    x = int(next(tokens))  # type: int
    solve(x)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
x = int(input())-1;q,r=divmod(x,11);print(2*q+(r>5)+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = (N // 11) * 2
res = N % 11

if res == 0:
    pass
elif res == 1 or res == 3 or res == 4 or res == 6 or res == 2 or res == 5:
    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<7:
    print(1+((x)//11)*2)
else:
    print(2+((x)//11)*2)

Submission status: Accepted

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

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())
ans = 0
n = x // 11

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def solve(X):
    q,r = divmod(X, 11)
# (5,6)

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

X = int(input())
print(solve(X))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, fractions, itertools


def solve(x: int):
    if x <= 6:
        print(1)
    else:
        m = (x-6) // 11
        if (x - 6) % 11 == 0:
            print(2 * m + 1)
        elif x - 6 <= 11 * m + 5:
            print(1 + (2 * m + 1))
        else:
            print(1 + (2 * m + 2))
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    x = int(next(tokens))  # type: int
    solve(x)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# 6565...
s = int(input().strip())
print((s//11)*2+(1<=s%11)+(7<=s%11))

Submission status: Accepted

Solution code:
n = int(input().strip())

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

Submission status: Accepted

Solution code:
N = int(input())
ans = (N//11)*2
if N%11 > 6:
  ans += 2
elif N%11 <= 6 and N%11 > 0:
  ans += 1
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+1)*2 )

Submission status: Accepted

Solution code:
x = int(input())


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
tmp = (math.ceil(N/11)-1)
N -= tmp*11
ans = tmp*2
if N >= 7:
  ans += 2
else:
  ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys

def main():
    num = int(input())
    ans = num // 11
    ans *= 2
    nokori = num % 11
    if nokori == 0:
        print(ans)
    elif nokori <= 6:
        print(ans + 1)
    else:
        print(ans + 2)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x=int(input())
n=x//11   # 5,6を連続
x=x-n*11  # 残り
if x>6:
    ans=2*n+2
elif x==0:
    ans=2*n
else:      # 1-6
    ans=2*n+1
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    x = II()
    if x < 1200:
        print("ABC")
    else:
        print("ARC")
    return

#B
def B():
    s = S()
    a = inf
    z = 0
    for num,si in enumerate(s):
        if si == "A":
            a = min(a, num)
        if si == "Z":
            z = max(z, num)
    print(z-a+1)
    return

#C
def C():
    x = II()
    print(x // 11 * 2 + (x % 11) // 7 + (x % 11 != 0))
    return

#D
def D():
    return

#Solve
if __name__ == '__main__':
    C()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
# dice face 5 start: snuke-kun's favorite number
q,r = divmod(x,11)
if r==0: print(q*2)
elif r<7: print(q*2+1)
else: print(q*2+2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
x = int(input())
print(math.ceil((2 * x - 1) / 11))

Submission status: Accepted

Solution code:
import math


def abc053c(x: int):
    y = int(x / 11)
    m = x - (y * 11)
    return y * 2 + math.ceil(m / 6)


if __name__ == '__main__':
    print(abc053c(int(input())))

Submission status: Accepted

Solution code:
x = int(input())

s = x // 11
a = x % 11

ans = s * 2

x -= 11 * s

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

print(ans)

Submission status: Accepted

Solution code:
import os
import sys

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

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

x = int(sys.stdin.readline())
m = x // 11
a = m * 11
m *= 2
if x - a > 0:
    a += 6
    m += 1
if x - a > 0:
    m += 1

print(m)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


def solve(x: int):
    ret = (x // 11) * 2
    if (x % 11) <= 0:
        ret += 0
    elif (x % 11) <= 6:
        ret += 1
    else:
        ret += 2
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    x = int(next(tokens))  # type: int
    solve(x)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

q = x // 11

mod = x % 11

ans = 2*q

if mod >= 1 and mod <= 6:
    ans += 1

elif mod >= 7:
    ans += 2

print(ans)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    ans = -1*(-n//11)*2
    if 1 <= n%11 <=6 :
        ans -=1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

if N <= 6:
  print(1)
elif N <= 11:
  print(2)
else:
  x,y = divmod(N,11)
  if y == 0:
    print(x * 2)
  elif y <= 6:
    print(x * 2 + 1)
  else:
    print(x * 2 + 2)

Submission status: Accepted

Solution code:
x = int(input())

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

print(cnt)

Submission status: Accepted

Solution code:
x=int(input())
# while x>0:
#     if count%2==0:
#         x-=6
#     else:
#         x-=5
#     count+=1
ans=x//11*2
amari=x%11
if amari>6:
    ans+=2
elif amari>0:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
x=int(input())

ans=int(x/11)*2

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

i_odd_u = (2 * x - 1)
i_even_u = 2 * x

if i_odd_u % 11 == 0:
    print(i_odd_u // 11)
elif i_even_u % 11 == 0:
    print(i_even_u // 11)
else:
    print(i_odd_u // 11 + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ans = n//11*2
tmp = ans*11/2
while tmp < n:
    tmp += 6
    ans += 1
    if tmp <n:
        tmp += 5
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
#N,M=map(int,input().split())
a=N//11
b=N%11
if b>6:
    print(2*a+2)
elif b>0:
    print(2*a+1)
else:
    print(2*a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC053C - X: Yet Another Die Game (ARC068C)
def main():
    x = int(input())
    ans, r = x // 11 * 2, x % 11  # r: remainder
    if r != 0:
        ans += 1 if x % 11 <= 6 else 2
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
from decimal import *

dice = [1,2,3,4,5,6]

x = int(input())

times = math.floor(Decimal(x)/Decimal(11))
amari = x%11

if amari > 6:
    ans = 2*times + 2
elif amari >= 1:
    ans = 2*times + 1
else:
    ans = 2*times
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 656565
x = int(input())

dp = [0,1,1,1,1,1,1,2,2,2,2,2,3,3]

answer = dp[x%11] + (x//11)*2
print(answer)

Submission status: Accepted

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

print (ans)

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

elif 6 < x < 12:
    print("2")
else:
    print("1")