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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, = map(int, raw_input().split())
r = (x//11)*2
x = x % 11
if x>6:
  r += 2
elif x>0:
  r += 1
print r

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v


# Width First Search (+ Distance)
def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk


# Depth First Search (+Distance)
def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False

# --------------------------------------------

dp = None


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

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

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

    print(ans)


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=int(input())
k=S//11
l=S%11
if l==0:
    print(2*k)
if 1<=l<=6:
    print(2*k+1)
if 7<=l<=10:
    print(2*k+2)

Submission status: Accepted

Solution code:
x = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
x = int(input())
y = x // 11 * 2
r = x % 11

if r > 6:
  y += 2
elif r > 0:
  y += 1
print(y)

Submission status: Accepted

Solution code:
n = int(input())

ans = (n // 11) * 2

m = n%11

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
x = int(input())


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! /usr/bin/python3
# X: Yet Another Die Game

""" サイコロの5と6をの面を交互に回し続ける """

x = int(input())

def answer(n):
    """ 答えを返す """
    a = n // 11
    b = n % 11

    if b > 6:  # 11で割った余りが6より大きい場合
        return a*2 + 2
    if b > 0:  # 11で割った余りが1~5の場合
        return a*2 + 1
    return a*2 # 11で割り切れる場合


def main():
    """ 答えを出力する """
    print(answer(x))


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
x = int(input())

s = int(x/11)
r = x % 11

if r > 6:
    print(2*s + 2)
elif r == 0:
    print(2*s)
else:
    print(2*s + 1)

Submission status: Accepted

Solution code:
n = int(input())

if n/11 == int(n/11):
     a = n/11
     print(int(2*a))
else:
    a = int(n/11)
    # a+1 の帯に入る
    if n <= 11*a+6:
        print(int(2*(a+1)-1))
    else:
        print(int(2*(a+1)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

tmp = (x // 11 + 1) * 2

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


print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
estimate = n//11 * 2
excess = n %  11

if   excess == 0:
    print(estimate)
elif excess <= 6:
    print(estimate+1)
else:
    print(estimate+2)

Submission status: Accepted

Solution code:
import sys
x=int(input())
i=0
cnt=0
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:
N = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

a = x % 11
b = x // 11

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

Submission status: Accepted

Solution code:
# 入力
import sys
stdin = sys.stdin

def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(ns())
def nf(): return float(ns())

x = ni()

base = 2*(x//11)

if x%11 == 0:
    print(base)
elif 0 < x%11 <= 6:
    print(base + 1)
else:
    print(base + 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:
n = int(input())
res = n//11 * 2 + [0,1,1,1,1,1,1,2,2,2,2][n%11]
print(res)

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

Submission status: Accepted

Solution code:
x = int(input())

n = x//11 * 2
nr = x%11
if nr == 0:
    pass
elif nr > 6:
    n += 2
elif nr <= 6:
    n += 1
print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

ans = (x//11)*2

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

print(ans)

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
x = int(input())
q = (x // 11) * 2
m = x % 11

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
if N > 6:
    P = int(N / 11)
    Q = N % 11
    if Q > 6:
        R = 2
    elif Q > 0 and 7 > Q:
        R = 1
    else:
        R = 0
    print(P * 2 + R)
else:
    print(1)

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

q, r = divmod(x, 11)

if r > 6:
    ans = 2 * q + 2
elif r > 0:
    ans = 2 * q + 1
else:
    ans = 2 * q

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    x = int(input())
    result = x * 2 // 11

    if (x * 2 % 11 != 0) and ((x - 6) % 11 != 0):
        result += 1

    print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())

rem = x % 11

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

Submission status: Accepted

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

Submission status: Accepted

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

if x<=6:
    print(1)
elif 7<=x<=11:
    print(2)
else:
    if x%11 ==1 or x%11 ==2 or x%11 ==3 or x%11 ==4 or x%11 ==5 or x%11 ==6:
        print((x//11)*2+1)
    elif x%11 ==7 or x%11 ==8 or x%11 ==9 or x%11 ==10:
        print((x // 11) * 2 + 2)
    else:
        print((x//11)*2)

Submission status: Accepted

Solution code:
'''
6が側面に来るようにして、6,5を繰り返す
'''
x = int(input())
cnt = 0
cnt += (x // 11) * 2
if 0 < (x % 11) <= 6:
    cnt += 1
elif 6 < (x % 11) < 11:
    cnt += 2
print(cnt)

Submission status: Accepted

Solution code:
x = int(input())

n = x//11
r = x%11

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

Submission status: Accepted

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

x = int(input())

a = x // 11
b = x % 11

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

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
x = int(input())

q, r = divmod(x, 11)

if r == 0:
  print(q * 2)
else:
  if r <= 6:
    print(q * 2 + 1)
  else:
    print(q * 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())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def main():
    x = input()
    x = int(x)

    ans = 0

#    x = x - 5
#    ans += 1

    ans += (x // 11) *2
    x = x % 11
    if x == 0:
        print(ans)
        exit()

    ans += x//6
    x = x % 6
    if x == 0:
        print(ans)
    else:
        ans += 1
        print(ans)

if __name__ == "__main__":
        main()

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

a = x // 11
b = x % 11

ans = a * 2
if b >= 1:
    ans += 1
if b >= 7:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
def m():
    x = int(input())
    ans = (x // 11) * 2
    if x % 11 == 0:
        return ans
    if x % 11 <= 6:
        return ans + 1
    return ans + 2

print(m())

Submission status: Accepted

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

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

s = n % 11
p = n // 11

if s == 0:
    print(2*p)
elif 1 <= s and s <= 6:
    print(2*p+1)
else:
    print(2*p+2)

Submission status: Accepted

Solution code:
x = int(input())

t = 0
t += x // 11 * 2

a = x % 11
if 1 <= a <= 6:
    t += 1
elif 6 < a <= 10:
    t += 2

print(t)

Submission status: Accepted

Solution code:
# 6,5の面を順に出し続けるのが最善
x = int(input())
tmp = x // 11 # 6,5の面を出したセット数
tmp2 = x % 11 # 端数
ans = tmp * 2
if 1 <= tmp2 <= 6: # 6をもう1度出す
  ans += 1
elif tmp2 >= 7: # 5ももう1度出す
  ans += 2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(raw_input())

a = 2 * (x / 11)
b = x % 11
if 1 <= b and b <= 6: a = a + 1
elif 7 <= b: a = a + 2

print a

Submission status: Accepted

Solution code:
import math
a=int(input())
j=math.floor(a/11)
if a==j*11:
  j=j*2
elif a - j * 11<=6:
  j=j*2+1
else:
  j=j*2+2
print(j)

Submission status: Accepted

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

if tmp==0:
    print(ans)
    exit()

if tmp<=6:
    ans+=1
elif tmp<11:
    ans+=2
print(ans)

Submission status: Accepted

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

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

y = int(x/11)

z = x-11*y

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

if n <= 6:
    ans = 1
elif 7 <= n <= 11:
    ans = 2
else:
    a = n // 11
    b = n % 11
    if b == 0:
        ans = a*2
    elif 1 <= b <= 6:
        ans = a*2 + 1
    else:
        ans = a*2 + 2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
ans=0
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=0
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:
import math
# 6,5の面を順に出し続けるのが最善
x = int(input())
tmp = math.ceil(x / 11)  # 6,5の面の順に出した回数
if 11 * tmp - x >= 5:
    # この条件を満たすと、最後のセットに5の面を出す必要がなかったことがわかる
    ans = tmp * 2 - 1
else:
    ans = tmp * 2
print(ans)

Submission status: Accepted

Solution code:
import math
N = int(input())
ans = math.ceil(N / 11) * 2
if 1 <= N % 11 <= 6:
    ans -= 1
print(ans)

Submission status: Accepted

Solution code:
def main():
    """
    1 <= x <= 10**15

    どのパターンで得点が一番多いか
    (5) -> 6 -> 5 > 6 -> 5 ...
    """
    x = int(input())

    d1, r1 = divmod(x, 11)
    ans = d1 * 2 + (r1 // 6) + (r1 % 6 > 0)

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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:
def solve():
    N = int(input())

    ans = N // 11

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

solve()

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    x = int(input())

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
from collections import defaultdict


def solve(x):
    if x % 11 == 0:
        return x // 11 * 2
    if x % 11 <= 6:
        return x // 11 * 2 + 1
    return x // 11 * 2 + 2


def main():
    x = int(input())
    print(solve(x))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict


def main():
    x = int(input())
    ans = (x // 11) * 2
    now = (x // 11) * 11
    a = 0
    while now < x:
        if a % 2 == 0:
            now += 6
        else:
            now += 5
        a += 1
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
ans += (n // 11) * 2
n %= 11

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

if x <= 6:
    print(1)
elif x<= 11:
    print(2)
else:
    z = x%11
    if 1 <= z <= 6:
        print((math.ceil(x/11)*2)-1)
    elif z <= 10 or z== 0:
        print(math.ceil(x/11)*2)

Submission status: Accepted

Solution code:
x = int(input())

sho = x // 11
ama = x % 11

count = 2 * sho
if 0 < ama < 11 :
    if ama > 6:
        count += 2
    else:
        count += 1

print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
x = int(input())
cnt = 0
cnt += x // (6 + 5) * 2
x %= (6 + 5)
if x >= 1:
    cnt += 1
    x -= 6
    if x >= 1:
        cnt += 1
        x -= 5
assert - 5 <= x <= 0
print(cnt)

Submission status: Accepted

Solution code:
x = 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())
m=int(N/11)
r=N%11
if r==0:
  print(2*m)
elif r<7:
  print(2*m+1)
else:
  print(2*m+2)

Submission status: Accepted

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

Submission status: Accepted

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