Under construction

Still being built. Things may change

The Lap Where the Backmarker Falls Behind

Time limit2sMemory limit512 MB

Summary
Given lap times X (fast) and Y (slow), find the leader's lap number when the leader first laps the slowest driver.
Level

Easy3 of 10

Topics
Math, Simulation
Solved
No attempts yet

Problem

In motor racing the leader often catches the last driver and passes him a full lap ahead. From that moment the last driver is one lap behind the leader.

You are given XX, the time the fastest driver needs to complete one lap, and YY, the time the slowest driver needs to complete one lap. Determine the number of the leader's lap in which the leader passes the slowest driver and puts him one lap behind.

Both drivers start side by side on the start line and begin lap 1 at the same instant, and each one runs at a constant speed. A new lap of the leader begins every time the leader crosses the start line. If the pass happens exactly at the instant the leader crosses the start line, the answer is the number of the lap that was being run up to that instant.

Input

The first line contains two integers XX and YY separated by a space (1≤X<Y≤100001 \le X < Y \le 10000). XX is the time the fastest driver needs for one lap and YY is the time the slowest driver needs for one lap, both in seconds.

Output

Print on one line the number of the leader's lap at which the slowest driver becomes one lap behind.

Examples4

  1. Example 1

    Input
    1 10
    
    Expected output
    2
    
  2. Example 2

    Input
    4 8
    
    Expected output
    2
    
  3. Example 3

    Input
    5 7
    
    Expected output
    4
    
  4. Example 4

    Input
    6875 7109
    
    Expected output
    31