Social Game

Time limit2sMemory limit512 MB

Summary
Given A, B, C, find the fewest logins that yield at least C coins, counting A per login plus B per full Mon-to-Sun week.
Level

Easy3 of 10

Topics
Math, Greedy, Number theory, Brute force
Solved
No attempts yet

Problem

JOI is going to start a new social game tomorrow.

In this social game, he can log in at most once per day, and each time he logs in he earns A coins.

Also, whenever he logs in for 7 consecutive days from Monday to Sunday, he earns an additional B coins.

There is no other way to earn coins.

Tomorrow is Monday. Find the minimum number of times JOI must log in to earn at least C coins.

Input

The input is given from standard input in the following format.

A B C

Output

Print the minimum number of times JOI must log in to earn at least C coins.

Constraints

  • 1 ≤ A ≤ 1000
  • 0 ≤ B ≤ 1000
  • 1 ≤ C ≤ 1000000 (= 10^6)

Examples2

  1. Example 1

    Input
    3 0 10
    
    Expected output
    4
    
  2. Example 2

    Input
    1 2 10
    
    Expected output
    8