#该代码运行时间太长了
a,b,n=map(int,input().strip().split())
def tonji():
sum = 0
count = 0
while True:
for i in range(1, 8):
count += 1
if i <= 5:
sum += a
else:
sum += b
if sum >= n:
return count
m = tonji()
print(m)
#这个可以
a, b, n = map(int, input().strip().split())
def tonji():
weekly_sum = 5 * a + 2 * b # 一周内的总和
full_weeks = n // weekly_sum # 完整周数
remaining = n % weekly_sum # 剩余部分
# 计算完整周数所需的天数
total_days = full_weeks * 7
# 计算剩余部分所需的天数
if remaining == 0:
return total_days
# 先尝试用工作日达到剩余部分
workday_sum = 0
for i in range(1, 6):
workday_sum += a
if workday_sum >= remaining:
return total_days + i
# 如果工作日不足以达到剩余部分,再用周末
weekend_sum = workday_sum
for i in range(6, 8):
weekend_sum += b
if weekend_sum >= remaining:
return total_days + i
m = tonji()
print(m)