P27918 [洛谷] [Language Month Competition 202403] Sparrow? Sparrow!
普及-
题目描述

Problem Description

Adorable szm sister has become fascinated with the game of Mahjong Soul. In Mahjong Soul, the rules for calculating points are as follows:

  • A mangan (full hand) is worth $5$ han (points), with the dealer receiving $12000$ points and other players receiving $8000$ points.
  • A haneman (jump mangan) is worth $6$ to $7$ han, and the points earned are $1.5$ times the mangan points.
  • A baiman (double mangan) is worth $8$ to $10$ han, and the points earned are $2$ times the mangan points.
  • A sanbaiman (triple mangan) is worth $11$ to $12$ han, and the points earned are $3$ times the mangan points.
  • When the han is $13x$ to $13x+12$ (where $x$ is a positive integer), it is called an $x$-times yakuman, and the points earned are $4x$ times the mangan points.

According to the game rules, if szm earns $x$ points, the first place player's points will decrease by $x$. For example, if the first place player currently has $35000$ points and szm has $22000$ points, after szm earns $8000$ points, the first place player's points will decrease to $27000$, and szm's points will increase to $30000$.

It is now the All Last (final round), and szm sister is the dealer, currently in second place. You need to find the minimum han that will allow her to become the first place player (with points not lower than the first place player's points).

Please note that the Mahjong Soul described in the problem is different from the real Mahjong Soul. Follow the problem description for the rules.

Input Format

Input consists of two integers $x$ and $y$, representing szm sister's points and the first place player's points, respectively.

Output Format

Output a single integer, which is the answer.

Sample Input and Output

Sample Input #1

10350 18350

Sample Output #1

5

Sample Input #2

10050 10060

Sample Output #2

5

Notes

Data Range and Constraints

For $30\%$ of the data, $1 \leq y-x \leq 24000$.
For $60\%$ of the data, $1 \leq y-x \leq 10^7$.
For $100\%$ of the data, $1 \leq x < y \leq 2 \times 10^9$, $1 \leq y-x \leq 10^9$.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
10350 18350
样例输出
5