Go: package main

import (
	"fmt"
)

func calcDay(daily, bonus, req int) int {
	fullWcoin   := 7 * daily + bonus	//"週給"
	sixDaycoin := 6 * daily				//6日目まででもらえるコイン

	week := req / fullWcoin //必要満週数
	day := 0
	rem  := req % fullWcoin
		
		if sixDaycoin < rem && rem < fullWcoin {
			week++
		} else {
			day = rem / daily
				if rem % daily > 0 {
					day++
				}
		}

	return 7 * week + day
}

func main() {
	var daily, bonus, req int
		fmt.Scanf("%d %d %d",&daily ,&bonus ,&req)
		fmt.Printf("%d\n",calcDay(daily, bonus, req))
}

Python: a,b,c=map(int,input().split())
ans=7
w=7*a+b
if c<=6*a:
    if c%a==0:
        ans=c//a
    else:
        ans=c//a+1
else:
    if c>w:
        ans+=(c//w-1)*7
        c-=c//w*w
        if c%a==0 and c<=6*a:
            ans+=c//a
        else:
            if 6*a<c<=7*a+b:
                ans+=7
            else:
                ans+=c//a+1
print(ans)

Python: 
def solve():
    A, B, C = map(int, input().split())
    count = 0
    coins = 0
    while True:
        if coins >= C:
            break
        count += 1
        coins += A
        if count % 7 == 0:
            coins += B
    print(count)


if __name__ == '__main__':
    solve()

Python: a,b,c=map(int,input().split())
d=0
s=0
while s<c:
    d+=1
    if d%7==0:
        s+=b
    s+=a
print(d)

Python: A,B,C=map(int,input().split())
X=1
while True:
    if (C<=A*X+(X//7)*B):

        print(X)
        break
    else:
        X=X+1

Python: a,b,c = map(int,input().split())

d = 0
s = 0
while s < c:
    d += 1
    if d%7 == 0:
        s += b
    s += a
print(d)

Python: a, b, c = map(int,input().rstrip().split())

day = 1
while((a*day + b*(day//7)) < c):
    day += 1

print(day)

Python: inputs = input().split(" ")

print(math.ceil(inputs[2]/(inputs[0]+(inputs[1]/7))))

Python: import math
a,b,c=map(int,input().split())
q,m=divmod(c,a*7+b)
print(7*q+min(7,math.ceil(m/a)))

Python: A,B,C=map(int,input().split())
count=0

while C>0:
    count+=1
    C-=A
    if count%7==0:
        C-=B
print(count)

Python: import math
a,b,c=map(int,input().split())
q,m=divmod(c,a*7+b)
print(7*q+min(7,math.ceil(m/a)))

Python: import sys
from math import ceil

sys.setrecursionlimit(100000)
A, B, C = list(map(int, input().split()))

if A * 7 >= C:
    print(ceil(C/A))
    exit()

cur = C
count = 0
count_i = 0
while cur > 0:
    count += 1
    count_i += 1
    if count_i == 7:
        count_i = 0
        cur -= B
    cur -= A

print(count)

Python: #0652
a , b , c = map(int,input().split())
sum = 0
count = 0 
while True:
    if sum >= c:
        break
    sum += a
    count += 1
    if count%7 == 0:
        sum += b 
        
print(count)

Python: A,B,C=map(int,input().split())

coin=0
for day in range(1,C+1):
    coin+=A
    if day % 7 == 0:
        coin+=B
    if coin >= C:
        break
    
print(day)

Python: 
if __name__ == '__main__':

	a,b,c = map(int,input().split())
	tmp = 0
	tmp2 = 0
	tmp3 = 0
	tmp4 = 0

	tmp = a * 7 + b
	tmp2 = int(c / tmp)
	tmp3 = c % tmp

	if tmp3 != 0:
		if tmp3 > a*7:
			tmp4 = 7
		else:
			tmp4 = int(tmp3 / a)
			if tmp3 % a != 0:
				tmp4 += 1
	if c < tmp:
		print(tmp4)
	else:
		print(tmp2*7 + tmp4)

Python: a,b,c=map(int,input().split())
m=0
for day in range(1,c+1):
    m+=a
    if day%7==0:
        m+=b
    if m>=c:break

print(day)

Python: a,b,c=map(int,input().split())
if b==0:
  if c%a==0:
    print(c//a)
  else:
    print((c//a)+1)
else :
  if (c-b)%a==0:
    if c-b>7:
      print(((c-b)//a))
    else:
      print(7+((c-b)//a))
  else:
    print(7+1+((c-b)//a))

Python: a,b,c=map(int,input().split())
w=a*7+b
ans=c//w*7
c=c%w
d=c//a
if c%a>0:d+=1
if d>7:d=7
ans+=d
print(ans)

Python: a,b,c = map(int,input().split())

ok = 100000000
ng = 0
while ok - ng > 1:
    m = (ok + ng) // 2
    ge = m * a + (m // 7) * b
    if ge >= c:
        ok = m
    else:
        ng = m
print(ok)

Python: a, b, c = map(int, input().split())
k = c//(7*a+b)
c -= k*(7*a+b)
if c <= 7*a:
    print(7*k + (c+a-1)//a)
else:
    print(7*(k+1))

Python: a,b,c=map(int,input().split())

day=0
coin=0

while coin<c:
    day+=1
    coin+=a
    if day%7==0:
        coin+=b
print(day)

Python: A,B,C = map(int,input().split())
i = 0
x = 0
while (i < C):
    x += 1
    if x%7 == 0:
        i += A+B
    else:
        i += A
else:
    print(x)

Python: a, b, x = map(int, input().split())
i = 0
while x>0:
    i += 1
    x -= a
    if i%7==0: x-=b
print(i)

Python: import math
A, B, C = map(int, input().split())
week = C // (A * 7 + B)
num = math.ceil(C % (A * 7 + B) / A)
if num > 7 :
    num = 7
print(week * 7 + num)

Python: A,B,C=map(int,input().split())
i=1
while A*i + i//7*B < C:
    i+=1
print(i)

Python: a, b, c = map(int, input().split())
s=int(a*7+b)
t=c//(7*a+b)
r=t*s
m=c-r

if (7*a)<(c-r)<s:
    print((t+1)*7)
else:
    coin=0
    day=0
    while coin<(c-r):
        coin+=a
        day+=1
    print(t*7+day)

Python: A,B,C=map(int,input().split())

coin=0
for day in range(1,C+1):
    coin+=A
    if day % 7 ==0:
        coin+=B
    if coin >= C: break

print(day)

Python: import random
import math
N = list(map(int, input().split()))
A=N[0]
B=N[1]
C=N[2]
x=(int)(C/(A*7+B))
sum=x*7

if abs(x*(A*7+B)-C)>= 0.0000001:
    for i in range (1,8):
        sum=sum+1
        if i== 7 and C<=x*(A*7+B)+i*A+B:
            break
        if C<=x*(A*7+B)+i*A:
            break
print(sum)

Python: a,b,c=map(int,input().split())
print(c//(7*a+b)*7+(7 if c%(7*a+b)>6*a else (c%(7*a+b)+a-1)//a))

Python: a,b,c=map(int,input().split())
i=1
while True:
    x=a*i+b*(i//7)
    if x >= c:
        print(i)
        break
    i += 1

Python: a, b, c = map(int, input().split())

coin=0
for day in range(1, c+1):
    coin+=a
    
    if day % 7 == 0:
        coin+=b
    if coin >= c: break

print(day)

Python: a,b,c=map(int,input().split())
ans=7
w=7*a+b
if c<=6*a:
    if c%a==0:
        ans=c//a
    else:
        ans=c//a+1
else:
    if c>w:
        ans+=(c//w-1)*7
        c-=c//w*w
        if c%a==0 and c<=6*a:
            ans+=c//a
        else:
            if 6*a<c<=7*a+b:
                ans+=7
            else:
                ans+=c//a+1
print(ans)

Python: import math
a, b, c=map(int,input().split())
w = a*7+b
x = c//w
y = c%w
if y <= a*7:
   print((7*x)+math.ceil(y/a))
else:
   print(7*(x+1))

Python: a, b, c = map(int, input().split())
q, r = divmod(c, a*7+b)
s = min(7, (r+a-1)//a)
print(7*q + s)

Python: a,b,c=map(int,input().split())
f=a*7+b
z=c//f
d=c%f
e=d//a
j=d%a
if d!=0:
    if d<=7*a:
        if d%a==0:
            print(7*z+e)
        if d%a!=0:
            print(7*z+e+1)
    else:
        print(7*z+7)
else:
    print(7*z)

Python: A,B,C=map(int,input().split())
s=0
sum=0
while 1:
    sum+=A
    s+=1
    if s%7==0:
        sum+=B
    if sum>=C:
        break
print(s)

Python: A,B,C=map(int,input().split())
print(C//(7*A+B)*7+(7 if C%(7*A+B)>6*A else (C%(7*A+B)+A-1)//A))

Python: A, B, C = map(int, input().split())
min_k = 1000000 // 7 + 1
min_r = 0
for r in range(7):
    u = C - r * A
    d = 7 * A + B

    k = 1
    if u < 0:
        k = 0
    elif u % d == 0:
        k = u // d
    else:
        k = u // d + 1

    if min_k > k:
        min_k = k
        min_r = r

print(7 * min_k + min_r)

Python: import math

(A, B, C) = list(map(int, input().split()))
cnt = 0
coin = 0

if A*7 < C:
    if A*7+B >= C:
        cnt = 7
    else:
        week_num = math.floor(C / (A*7+B))
        cnt = week_num * 7
        coin = week_num * (A*7+B)

        if A*7 < C - coin:
            cnt += 7
        else:
            cnt += math.ceil((C - coin) / A)
else:
    cnt += math.ceil((C - coin) / A)
    
print(cnt)

Python: A,B,C = map(int,input().split ())
coin = 0
for day in range(1,C+1):
    coin+=A
    if day % 7 == 0:
        coin+=B
    if coin >= C:break
print(day)