B - Power Socket Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 200

問題文

高橋くんの家には電源プラグの差込口が 1 口しかありません。

そこで、高橋くんは A 個口の電源タップをいくつか使って未使用の差込口を B 口以上に拡張したいと考えています。

A 個口の電源タップ 1 つと未使用の差込口 1 口を使って、新たに差込口を A 口増やすことができます。

最小でいくつの電源タップが必要でしょうか。

制約

  • 入力は全て整数である。
  • 2 \leq A \leq 20
  • 1 \leq B \leq 20

入力

入力は以下の形式で標準入力から与えられる。

A B

出力

必要な電源タップの個数の最小値を出力せよ。


入力例 1

4 10

出力例 1

3

4 個口の電源タップを 3 つ使うと、未使用の差込口は 10 口になります。


入力例 2

8 9

出力例 2

2

8 個口の電源タップを 2 つ使うと、未使用の差込口は 15 口になります。


入力例 3

8 8

出力例 3

1

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