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:
import math
x = int(input())
# 6,5,6,5 ・・・と得点していく
# 答えはx/5.5付近
t = math.ceil(x/5.5)
def f(n):
    return 6*n - n//2

if x <= f(t-1):
    print(t-1)
elif x <= f(t):
    print(t)
else:
    print(t+1)

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

Solution code:
# 6>5>6>5>6>5...
import math
y=int(input())
#print((55*x+9)//10=y)
print(((y*10-9)+54)//55)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math

#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
x = I()
ans = 0
if x >= 11:
    el = x//11
    ans += el * 2
    x -= 11 * el
if 0 < x <= 6:
    ans += 1
elif 6 < x < 11:
    ans += 2
print(ans)

Submission status: Accepted

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

x = I()-1
print(x//11*2+1+(x%11)//6)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

x = int(input())

cnt = -(-x//11)
if cnt*11-x>=5:
    print(cnt*2-1)
else:
    print(cnt*2)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
import math 
x = int(input())
# x = 10**15
xi = math.floor(x/5.5)
# print(xi)
for i in range(xi,10000000000000000000000000000):
    # print(6*i - math.floor(i/2))
    if(x <= 6*i-math.floor(i/2)):
        xa = i
        break

print(xa)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

div, mod = divmod(x, 11)

add = 0
if 0 < mod <= 6:
    add = 1
elif mod > 6:
    add = 2

print(div * 2 + add)

Submission status: Accepted

Solution code:
X = int(input())

t = X // (6 + 5)
a = X % (6 + 5)
b = 0
if a > 6:
    b = 2
elif a == 0:
    b = 0
else:
    b = 1
print(2 * t + b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
from math import ceil
cnt = ceil(x/11)

if 11*cnt - 5 >=x:
    ans=cnt*2-1
else:
    ans=cnt*2
    
print(ans)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    ans = 0
    ans += n // 11 * 2
    if n % 11 <= 6 and n % 11 != 0:
        ans += 1
    elif n % 11 <= 10 and n % 11 > 6:
        ans += 2
    print(ans)
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

shou = x//11

amari = x%11

if amari == 0:
    print(shou*2)
elif amari < 7:
    print(shou*2+1)
else:
    print(shou*2+2)

Submission status: Accepted

Solution code:
x = int(input())
rem = x%11
cnt = (x-rem)//11
cnt *= 2

if 0 < rem <= 6:
    cnt += 1
elif rem > 6:
    cnt += 2

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

x = I()
q,r = x//11,x % 11
ans = 2*q
if 1 <= r <= 6:
    ans += 1
elif r >= 7:
    ans += 2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/arc068/tasks/arc068_a

x = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
x = int(input())
if x <= 11:
    if x <= 6:
        print(1)
    else:
        print(2)
else:
    ans = (x // 11) * 2
    x = 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())

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

Submission status: Accepted

Solution code:
import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

Submission status: Accepted

Solution code:
x = int(input())

ans = x // 11 * 2
print(ans + (x % 11 > 0) + (x % 11 > 6))

Submission status: Accepted

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

if a == 0:
    pass
elif a <= 6:
    ans += 1
else:
    ans += 2

print(ans)

Submission status: Accepted

Solution code:
x = int(input())
_x = x % 11
if _x <= 6:
    if _x == 0:
        _x = 0
    else:
        _x = 1
else:
    _x = 2

print((x // 11) * 2 + _x)

Submission status: Accepted

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

Submission status: Accepted

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

ans = x//11*2
x %= 11

# 0 <= x < 11 になっている
if x == 0:
  pass
elif x <= 6:
  ans += 1
else:
  ans += 2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X=int(input())

Q,R=divmod(X,11)

if R==0:
    K=0
elif 1<=R<=6:
    K=1
else:
    K=2

print(2*Q+K)

Submission status: Accepted

Solution code:
x=int(input())
d,m=divmod(x,11)
ans=2*d
if m==0:
  pass
elif m<7:
  ans+=1
else:
  ans+=2
print(ans)

Submission status: Accepted

Solution code:
X = int(input())
res = X//11*2
X %= 11
res += X//6
X %= 6
if X:
    res += 1

print(res)

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x = int(input())

if x <= 6:
    print(1)
    exit()

div, mod = divmod(x, 6 + 5)
# print(f'{div=}, {mod=}')

if mod == 0:
    ans = div * 2
elif mod <= 6:
    ans = div * 2 + 1
else:
    ans = div * 2 + 2
print(ans)

Submission status: Accepted

Solution code:
def solve():
  N = int(input())
  ans = N//11*2+(N%11>6)+(N%11>=1)
  return ans
print(solve())

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:
def main():
    x = int(input())

    r, m = divmod(x, 11)
    ans = 2*r

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x = int(input())

jitubu = x//11
tiisai = x-(jitubu*11)

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

Submission status: Accepted

Solution code:
import sys
#import string
#from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

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

def solve():
    x = int(stdin.readline().rstrip())
    sho, amari = divmod(x,11)
    if amari == 0:
        print(sho * 2)
    elif amari <= 6:
        print(sho*2 + 1)
    else:
        print(sho*2 +2)



if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf,comb
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

x = INT()
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:
p, q = divmod(int(input()), 11)
print(p*2 + (q and [1, 2][q > 6]))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
x = int(input())
print(x // 11 * 2 - (-(x % 11) // 6))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[15]:


x = int(input())


# In[16]:


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


# In[ ]:

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    x = I()

    # 5を上にして、6と5を交互に出す
    ans = 0
    ans += x // 11 * 2
    x %= 11
    if x == 0:
        print(ans)
    elif 0 < x <= 6:
        print(ans + 1)
    else:
        print(ans + 2)

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
n=int(input())
def f(n):
    six=(n+1)//2
    five=n-six
    return 6*six+5*five
l,r,ans=0,10**18,-1
while(l<=r):
    m=(l+r)//2
    if(f(m)>=n):
        ans=m
        r=m-1
    else:
        l=m+1
print(ans)

Submission status: Accepted

Solution code:
import sys, math
from itertools import combinations
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())

tmp1 = x//11
tmp2 = x%11

ans = 2*tmp1
if tmp2 > 6:
    ans += 2
elif tmp2 > 0:
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
x=int(input())
ans=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 = (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())
print(x // 11 * 2 + (x % 11 >= 7) + (x % 11 > 0))

Submission status: Accepted

Solution code:
def resolve():
    '''
    code here
    '''
    x = int(input())
    if x%11 != 0:
        print((x//11)*2 + (x%11)//7 +1)
    else:
        print((x//11)*2 + (x%11)//7)


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
"""
回転した後に得られる点数 = 上と下を向いている面以外の面に書かれている数
6→5→6→...と選んでいけばよさそう。
"""
X = int(input())
if X <= 6:
    print(1)
elif X <= 11:
    print(2)
else:
    cnt = X // 11
    X -= cnt * 11
    if X == 0:
        print(cnt * 2)
    elif X <= 6:
        print(cnt * 2 + 1)
    else:
        print(cnt * 2 + 2)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/arc068/tasks/arc068_a

x = int(input())

# 6の面が上向きになるように置き、次は5にする。そしてまた6に戻す。
# この2回の操作で11点獲得できる。これが2回の操作で得られる最高点である。

n = x // 11
ans = n * 2
x -= n * 11

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
ans=(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:
# -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict
from math import sqrt, factorial, gcd, ceil
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8')


def solve():
    # n, m = [int(x) for x in input().split()]
    n = int(input())
    ans = (n // 11)*2
    n %= 11

    if n > 6:
        ans += 2
    elif n:
        ans += 1
    print(ans)
    
    
t = 1
# t = int(input())
for case in range(1,t+1):
    ans = solve()


"""

R s
S p
P r

"""

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	x = int(input())
	#b , c = tin()
	#s = input()
	na = x // 11
	nb = x % 11
	nc = 0 if nb == 0 else 1 if nb <= 6 else 2
	return na * 2 + nc
	
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

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

ans = x//11 * 2
mod = x%11

if 0 < mod < 7:
    ans += 1
elif mod >= 7:
    ans += 2

print(ans)

Submission status: Accepted

Solution code:
x=int(input())

ans=(x//11)*2
rest=x%11

if rest>0 and rest<=6:
    ans+=1
elif rest>6 and rest<=10:
    ans+=2
else:
    ans+=0

print(ans)

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
#
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
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 S(): return input()
def LS(): return input().split()


INF = float('inf')


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

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:
x = int(input())

print((x//11)*2+int("01111112222"[x%11]))

Submission status: Accepted

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

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

def main():
	x=II()
	q,r=divmod(x,11)
	ans=0
	if r==0:
		ans-=1


	ans+=2*q+1+(r>6)

	print(ans)


if __name__ == "__main__":
	main()

Submission status: Accepted

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

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:
x = int(input())
a = (x // 11) * 2
b = 2 if x % 11 > 6 else 0 if x % 11 == 0 else 1

print(a + b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
x = I()
div = x // 11
ans = div * 2
x -= div * 11
if x > 6:
    ans += 2
elif x >= 1:
    ans += 1
else:
    ans += 0
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# hello worldと表示する
# coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

Q = (x-1)//11
M = (x-1)%11 

if M <= 5:
  print(2*Q+1)
else:
  print(2*Q+2)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import sys
read = sys.stdin.read
readline = sys.stdin.readline

x, = map(int,read().split())


v = x//11*2
x %= 11
if x > 6: v += 2
elif x: v += 1


print(v)

Submission status: Accepted

Solution code:
x = int(input())
ans_half = -(-x//11)
if x <= 11*ans_half-5:
    print(2*ans_half-1)
else:
    print(2*ans_half)

Submission status: Accepted

Solution code:
x = int(input())
ans = int(x//5.5)
half = ans//2

y = 6*half+5*half
ans = 2*half
if x <= y:
    print(ans)
else:
    for i in range(3):
        if i % 2 == 0:
            y += 6
        else:
            y += 5
        ans += 1
        if x <= y:
            print(ans)
            break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

x = i()
num = (x//11)*11
r = x-num
if r == 0:
    print((x//11)*2)
elif r <= 6:
    print((x//11)*2+1)
else:
    print(((x//11)+1)*2)

Submission status: Accepted

Solution code:
x = int(input())

s = x//11

cnt = s*2

x -= s*11

if x == 0:
    pass
elif x <= 6:
    cnt += 1
elif x < 11:
    cnt += 2
else:
    print('error')

print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
N = N-1

P = N//11
K = N%11

if K <= 5:
	count = 1
else:
	count = 2

print(2*P+count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
q, mod = divmod(x, 11)
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())
div,mod = divmod(x,11)

ans = div*2

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())

cnt=x%11

ans=2*(x//11)
if cnt>=1 and cnt<=6:
    ans+=1
elif cnt>=7 and cnt<=10:
    ans+=2

print(ans)

Submission status: Accepted

Solution code:
x=int(input())

cnt=x%11

ans=2*(x//11)
if cnt>=1 and cnt<=6:
    ans+=1
elif cnt>=7 and cnt<=10:
    ans+=2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
Accepted    　:No
difficult   　: 
ペナルティ　  　:5分
実際の回答時間  :分
WAの回数　     :回
合計時間　　  　:分
'''

def myAnswer(x:int) -> int:
   total = 0
   if (x > 11):
      total = x // 11 * 2
      x = x % 11
   if(x == 0):
      return total
   elif(x <= 6):
      return total + 1
   else:
      return total + 2


def modelAnswer():
   return
def main():
   x = int(input())
   print(myAnswer(x))

if __name__ == '__main__':
   main()

Submission status: Accepted

Solution code:
x = int(input())

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

print(res)

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())
ans = 2*(X//11)
X2 = X%11
if X2 == 0:
    print(ans)
elif X2 > 6:
    print(ans + 2)
else:
    print(ans + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
#from fractions import gcd
#from itertools import combinations # (string,3) 3回
#from collections import deque
#from collections import defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
e = n//11
cnt = e*2
amari = n - 11 * e
if 6 < amari:
    cnt += 2
elif 0 < amari:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())

#ずっと65656565
count = (n//11)*2
mod = n%11
if 1 <= mod <= 6:
    count += 1
elif mod > 6:
    count += 2
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
#6と5を繰り返す
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())
ans=(n//11)*2
n%=11
if n>=7:ans+=2
elif n:ans+=1
print(ans)

Submission status: Accepted

Solution code:
x = int(input())

n = (x//11)

x -= n*11
r = 0
if 0 < x <= 6:
    r = 1
elif 6 < x < 11:
    r = 2

print(2*n+r)

Submission status: Accepted

Solution code:
x=int(input())
a=x//11
b=x%11
while (a+1)*11<=x:
  a+=1
if b>6:
  print(2*a+2)
else:
  if b==0:
    print(2*a)
  else:
    print(2*a+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+2)
else:
    print(2*a+1)