Good Bye 2016
A
New Year and Hurry
Codeforces
800
原题
←B →
翻译中…

Limak is going to participate in a contest on the last day of the 2016. The contest will start at 20:00 and will last four hours, exactly until midnight. There will be $*n*$ problems, sorted by difficulty, i.e. problem $1$ is the easiest and problem $*n*$ is the hardest. Limak knows it will take him $5·*i*$ minutes to solve the $*i*$-th problem.

翻译中…

Limak's friends organize a New Year's Eve party and Limak wants to be there at midnight or earlier. He needs $*k*$ minutes to get there from his house, where he will participate in the contest first.

翻译中…

How many problems can Limak solve if he wants to make it to the party?

翻译中…

Input

翻译中…

The only line of the input contains two integers $*n*$ and $*k*$ ($1 ≤ *n* ≤ 10$, $1 ≤ *k* ≤ 240$) — the number of the problems in the contest and the number of minutes Limak needs to get to the party from his house.

翻译中…

Output

翻译中…

Print one integer, denoting the maximum possible number of problems Limak can solve so that he could get to the party at midnight or earlier.

翻译中…

Note

翻译中…

In the first sample, there are $3$ problems and Limak needs $222$ minutes to get to the party. The three problems require $5$, $10$ and $15$ minutes respectively. Limak can spend $5 + 10 = 15$ minutes to solve first two problems. Then, at 20:15 he can leave his house to get to the party at 23:57 (after $222$ minutes). In this scenario Limak would solve $2$ problems. He doesn't have enough time to solve $3$ problems so the answer is $2$.

翻译中…

In the second sample, Limak can solve all $4$ problems in $5 + 10 + 15 + 20 = 50$ minutes. At 20:50 he will leave the house and go to the party. He will get there exactly at midnight.

翻译中…

In the third sample, Limak needs only $1$ minute to get to the party. He has enough time to solve all $7$ problems.

翻译中…

样例

Input #1
3 222
Output #1
2
InputCopy OutputCopy
Input #2
4 190
Output #2
4
InputCopy OutputCopy
Input #3
7 1
Output #3
7
InputCopy OutputCopy
题目信息
题号
750A
所属比赛
时间限制
1 s
内存限制
256 MB
标签
二分
暴力
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。