Problem:
Score : 200 points

Problem Statement

Takahashi's house has only one socket.

Takahashi wants to extend it with some number of power strips, each with A sockets, into B or more empty sockets.

One power strip with A sockets can extend one empty socket into A empty sockets.

Find the minimum number of power strips required.

Constraints

All values in input are integers.

2 \leq A \leq 20

1 \leq B \leq 20

Input

Input is given from Standard Input in the following format:

A B

Output

Print the minimum number of power strips required.

Sample Input 1

4 10

Sample Output 1

3

3 power strips, each with 4 sockets, extend the socket into 10 empty sockets.

Sample Input 2

8 9

Sample Output 2

2

2 power strips, each with 8 sockets, extend the socket into 15 empty sockets.

Sample Input 3

8 8

Sample Output 3

1

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include<bits/stdc++.h>
#define ll long long
#define MAX 1e9+7
#define MIN -MAX
#define i(a) cin>>a
#define in(a,b) cin>>a>>b
#define o(a) cout<<a
#define loop(i,a,b) for(ll i=a;i<b;i++)
#define loop1(i,a,b) for(ll i=a;i<=b;i++)
#define v(a) vector<ll>a
#define mp(a,b) make_pair(a,b)
#define NO_OF_CHARS 256
using namespace std;
int countDivisors(int n)
{
    int cnt = 0;
    for (int i = 1; i <= sqrt(n); i++) {
        if (n % i == 0) {
            // If divisors are equal,
            // count only one
            if (n / i == i)
                cnt++;

            else // Otherwise count both
                cnt = cnt + 2;
        }
    }
    return cnt;
}
int power(int x,int y)
{
    int temp;
    if( y == 0)
        return 1;
    temp = power(x, y/2);
    if (y%2 == 0)
        return temp*temp;
    else
        return x*temp*temp;
}
int lenOfLongIncSubArr(int arr[], int n)
{
    // 'max' to store the length of longest
    // increasing subarray
    // 'len' to store the lengths of longest
    // increasing subarray at diiferent
    // instants of time
    int max = 1, len = 1;

    // traverse the array from the 2nd element
    for (int i=1; i<n; i++)
    {
        // if current element if greater than previous
        // element, then this element helps in building
        // up the previous increasing subarray encountered
        // so far
        if (arr[i] <= arr[i-1])
            len++;
        else
        {
            // check if 'max' length is less than the length
            // of the current increasing subarray. If true,
            // then update 'max'
            if (max < len)
                max = len;

            // reset 'len' to 1 as from this element
            // again the length of the new increasing
            // subarray is being calculated
            len = 1;
        }
    }

    // comparing the length of the last
    // increasing subarray with 'max'
    if (max < len)
        max = len;

    // required maximum length
    return max;
}
//In one operation u can choose any element in an array
//and divide it by 2.The value of K is given and we can divide
//K times.We have to find the minm sum.
int main(){
    float a,b,c;
    cin>>a>>b;
    c = ceil((b-a)/(a-1));
    cout<<c+1;
}