Page not loading? Try clicking here.
Placeholder

#3360
Subtask

RPG game 2s 512MB

Problems

Jeong-ol decided to start a new RPG game starting today. 

In this game, you can log in once a day, and you can get A coins every time you log in.

Also, if you log in for 7 consecutive days from Monday to Sunday, you can get an additional B coins each time.

There is no other way to get coins.

Today is Monday. 

Find the minimum number of times Jeong-ol must log in to get at least C coins. 


Input

In the first line, three numbers A, B, and C are given in order, separated by spaces. (1 \le A, B \le 1\,000, 1 \le C \le 1\,000\,000)


Output

Print the minimum number of logins required for Jeongol to obtain C or more coins.


Subtask

# Score Condition
#140

B=0

#260

No additional restrictions


Example #1

3 0 10
4

You can earn 12 coins by logging in for 4 consecutive days starting from Monday.

Since you cannot earn 10 or more coins with 3 or fewer logins, the minimum number of logins required is 4.


Example #2

1 2 10
8

If you log in consecutively from Monday to Sunday, you can get 2 additional coins in addition to the 7 daily coins, for a total of 9 coins. Therefore, if you log in one more time, you can get 10 coins.

Since you cannot get 10 or more coins with 7 or fewer logins, the minimum number of times you must log in is 8.



Source

JOI 2019 예선

You must sign in to write code.