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

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

Python: # -*- coding: utf-8 -*-
# 学籍番号 17D8101029G 石塚 博之 ID: mcatpolo 言語: python3

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

n = int(0)
i = int(0)

while True:
    i += 1
    n += a
    if i%7 == 0:
        n+=b

    if n >= c:
        break

print(i)

Python: 
a,b,c=map(int,input().split())
#b=int(input())
#c=int(input())
day=0
cnt=0
while(True):
    day+=1
    #print(day)
    #print(c)
    if day%7==0:
        c-=b
    c-=a
    if c<=0:
        break
print(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: 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())

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=1
result=0
while True:
    if result>=c:
        break
    result+= a
    if i%7==0:
        result+=b
    i+=1
print(i-1)

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

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

x=0
i=0

while x<c:
    x+=a
    i+=1
    
    if i%7==0:
        x+=b

print(i)

Python: a, b, c = map(int, input().split())
ans = c//(a*7+b)*7+min((c%(a*7+b)+a-1)//a,7)
print(ans)

Python: A,B,C=map(int,input().split())
x=A*7+B
y=C//(A*7+B)
z=x*y
w=C-z

if (A*7)<w<x:
    print((y+1)*7)
else:
    coin=0
    day=0
    while coin<w:
        coin+=A
        day+=1
    print(y*7+day)

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

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

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

Python: import sys
from sys import stdin

#input = stdin.readline()

A, B, C = input().split()
A = int(A)
B = int(B)
C = int(C)

def Process(A, B, C):    #その一週間のログイン計画を演算する
    got, login = 0, 0
    if C > (7*A+B):    #一週間フルでログインしてもまだ目標に到達しない場合.
        week, remain = divmod(C, (7*A+B))
        login += (7*week)
        got += ((7*A+B)*week)

    local_date = 1
    while C > got:
        got += A
        login += 1
        local_date += 1
        if local_date == 8:
            got += B
    return login

print(Process(A, B, C))

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

print(n)

Python: #!/usr/bin/python3

import array
from fractions import Fraction
import functools
import itertools
import math
import os
import sys


def main():
    A, B, C = read_ints()
    print(solve(A, B, C))


def solve(A, B, C):
    weekly = A * 7 + B
    weeks = C // weekly
    rest = C - weekly * weeks
    days = (rest + A - 1) // A
    if days > 7:
        days = 7
    return weeks * 7 + days


###############################################################################
# AUXILIARY FUNCTIONS

DEBUG = 'DEBUG' in os.environ


def inp():
    return sys.stdin.readline().rstrip()


def read_int():
    return int(inp())


def read_ints():
    return [int(e) for e in inp().split()]


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


if __name__ == '__main__':
    main()

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

sum=0
cnt=0

for i in range(1,C+1):
    sum=sum+A
    if i%7==0:
        sum=sum+B
    if sum>=C:
        cnt=i
        break

print(cnt)

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

Python: # coding: utf-8
# Your code here!
a,b,c=map(int,input().split())

sum=0
i=0
while True:
    sum+=a
    i+=1
    if sum>=c:
        print(i)
        break
    if i%7==0:
        sum+=b
        if sum>=c:
            print(i)
            break

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 sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    a,b,c=MI()
    week,r=divmod(c,7*a+b)
    day=(r+a-1)//a
    print(week*7+min(7,day))

main()

Python: A,B,C=map(int,input().split())
coin=0
for day in range(1,1+C): #1日からC日まで繰り返す
    coin=coin+A
    if day%7==0: 
        coin=coin+B #七日経ったらB枚のコインも追加
    if coin>=C:
        break #coinがC枚より多くなったら繰り返し終了
print(day)

Python: a,b,c=map(int,input().split())
nowpoint=0
day=0
while 1:
    if c-nowpoint<=a*6:
        day+=(c-nowpoint+a-1)//a
        break
    elif c-nowpoint<=a*7+b:
        day+=7
        break
    day+=7
    nowpoint+=a*7+b
print(day)

Python: # coding: utf-8
# Your code here!

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

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

Python: 
import sys
from math import ceil

def solve(a, b, c):
    q, r = divmod(c, (a*7 + b))
    return q * 7 + min(ceil(r / a), 7)


def main(args):
    a, b, c = map(int, input().split())
    ans = solve(a, b, c)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[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=0
while c>0:
	c-=a
	if ans%7==6:
		c-=b
	ans+=1
print(ans)

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

Python: sum_coins = 0
coin_day, coin_weekly, coin_needed = map(int, input().split())
day = 0

while sum_coins < coin_needed:
    day +=1
    sum_coins += coin_day

    if day % 7 == 0:
        sum_coins += coin_weekly
print(day)

Python: inputs = input().split()
a = int(inputs[0])
b = int(inputs[1])
c = int(inputs[2])

y = 7*c / (7*a + b)
if y - int(y) > 0:
    x = int(y) + 1
else:
    x = int(y)


while True:
    if a*x + int(x/7) * b >= c:
        print(x)
        break
    else:
        x+=1

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