This page is still under construction.

Parts of this page are still being built. What you see may change.

Climbing Worm

Time limit1sMemory limit1024 MB

Summary
Given a climb a, a slide b, and a pole height h, the task is to count how many crawls the worm needs to reach the top.
Level

Easy2 of 10

Topics
Math, Simulation
Solved
No attempts yet

Problem

A worm is at the bottom of a pole. It wants to reach the top, but it is too lazy to climb to the top without stopping. Each time, it can crawl up aa inches in one go. Right after that, it rests and slides down bb inches, where bb is less than aa. How many times must the worm crawl up to reach the top of the pole?

Input

The input is a single line with three integers aa, bb (0≤b<a≤1000 \leq b < a \leq 100), and hh (0<h≤100 0000 < h \leq 100\,000). They are the number of inches aa the worm can climb at a time, the number of inches bb the worm falls while resting, and the height hh of the pole. The worm is modeled as a point, so it has no length.

Output

Print the number of times the worm must crawl up to reach the top of the pole.

Examples2

  1. Example 1

    Input
    5 0 15
    
    Expected output
    3
    
  2. Example 2

    Input
    3 1 4
    
    Expected output
    2