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# (Mono 4.6.2.0) (judge verdict: Wrong Answer)

using System;
using System.Collections.Generic;
using System.Linq;

namespace competitive_programming
{
    public class Program
    {
        static void Main(string[] args)
        {
            var sep = ' ';
            var cin = new ConsoleInput(Console.In, sep);
            var program = new Program();
            program.Solve(cin);
        }

        private void Solve(ConsoleInput cin)
        {
            var a = cin.ReadInt;
            var b = cin.ReadInt;
            var x = (int)((b - 1) / (a - 1) + 1);

            Console.WriteLine(x);
        }
    }
    internal class ConsoleInput
    {
        private readonly System.IO.TextReader stream;
        private readonly char separator = ' ';
        private readonly Queue<string> inputStream = new Queue<string>();
        public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
        {
            this.separator = separator;
            this.stream = stream;
        }
        public string Read
        {
            get
            {
                if (inputStream.Count != 0)
                {
                    return inputStream.Dequeue();
                }

                string[] tmp = stream.ReadLine().Split(separator);
                foreach (string v in tmp)
                {
                    inputStream.Enqueue(v);
                }
                return inputStream.Dequeue();
            }
        }
        public string ReadLine => stream.ReadLine();
        public int ReadInt => int.Parse(Read);
        public long ReadLong => long.Parse(Read);
        public double ReadDouble => double.Parse(Read);
        public string[] ReadStrArray(long N)
        {
            var ret = new string[N];
            for (long i = 0; i < N; ++i)
            {
                ret[i] = Read;
            }
            return ret;
        }
        public int[] ReadIntArray(long N)
        {
            var ret = new int[N];
            for (long i = 0; i < N; ++i)
            {
                ret[i] = ReadInt;
            }
            return ret;
        }
        public long[] ReadLongArray(long N)
        {
            var ret = new long[N];
            for (long i = 0; i < N; ++i)
            {
                ret[i] = ReadLong;
            }
            return ret;
        }
    }

    public class SegmentTree
    {
        private readonly int _n;
        private readonly int _N;
        private readonly int[] _values;
        public SegmentTree(int n)
        {
            _n = n;
            _N = 1;
            while (_N < _n) _N *= 2;
            _values = new int[_N];
        }

        public SegmentTree(int n, int init = int.MaxValue) : this(n)
        {
            for (var i = 0; i < _N; ++i) _values[i] = init;
        }

        public void Update(int i, int value)
        {
            int idx = i + _N - 1;
            _values[idx] = value;
            while (idx > 0)
            {
                idx = parent(idx);
                _values[idx] = Math.Min(_values[lchild(idx)], _values[rchild(idx)]);
            }
        }

        public int Find(int a, int b, int k = 0, int l = 0, int r = -1)
        {
            if (r < 0) r = _N;

            if (r <= a || b <= l) return int.MaxValue;

            if (a <= l && r <= b) return _values[k];

            int lvalue = Find(a, b, lchild(k), l, (l + r) / 2);
            int rvalue = Find(a, b, rchild(k), (l + r) / 2, r);
            return Math.Min(lvalue, rvalue);
        }

        private int parent(int i) => (int)((i - 1) / 2);

        private int lchild(int i) => 2 * i + 1;

        private int rchild(int i) => 2 * i + 2;
    }
}