Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func printArr(arr []string) {
	fmt.Println(strings.TrimRight(fmt.Sprintf("%+v", arr)[1:], "]"))
}

func main() {
	scanner.Split(bufio.ScanWords)

	coinDaily, _ := nextInt()
	coinWeekly, _ := nextInt()
	coinTarget, _ := nextInt()

	coinCurrent := 0
	i := 0
	for i = 0; i <= 1000000; i++ {
		coinCurrent += coinDaily
		if (i+1)%7 == 0 {
			coinCurrent += coinWeekly
		}
		if coinCurrent >= coinTarget {
			break
		}
	}
	fmt.Println(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())

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
    #月曜日から日曜日まで 7 日連続でログインすると
    if day % 7 == 0:
        coin+=B
    if coin >= C: break

print(day)

Python: import math
line = input().split(" ")
A = int(line[0])
B = int(line[1])
C = int(line[2])

W = C//(7*A+B)
remain = C - (7*A+B)*W
#print(W, " ", remain)
D = 0
if(remain >= 7*A):
    D = 7 
else:
    D = math.ceil(remain/A)

ans = 7*W + D

print(ans)

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

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)