#Lutece0224. Penatly

Penatly

Migrated from Lutece 224 Penatly

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

BUPT ACM-ICPC team Dinic consists of three programmers: wangkun, tomato and zzh. A long time ago, during the first few months the team was founded, zzh was very often late to the trainings and contests. To stimulate zzh to be more punctual, wangkun and tomato decided to introduce a new rule for team participants. If somebody is late (i.e. comes at least one second after appointed time) he owes 11 dollar to other team members. If he is late for 22 minutes, he owes 22 dollar . If he is late for 44 minutes, he owes 33 dollar. If he is late for 88 minutes, he owes 44 dollar. If he is late for 1616 minutes, he owes 55 dollar. If he is late for 3232 minutes, he owes 66 dollar. If he is late for 6464 minutes, he owes 77 dollar. If he is late for 128128 minutes, he owes 88 dollar. If he is late for 256256 minutes, he owes 99 dollar. And if he is late for 512512 minutes or more, he owes 1010 dollar.

The training starts at the time SS (counted in seconds, from some predefined moment of time) and Andrew comes at the time PP (also in seconds, counted from the same moment of time).

Your task is to find how many dollars Andrew owes.

Input

The input file contains single line with integer numbers SS and P(1S,P105)P (1 \leq S,P \leq 10^5). The input end with 0 0.

Output

Write to the output file the number of cups zzh owes.

Samples

10 10 
10 12 
0 4 
0 0
0
1
1

Resources

第四届北京邮电大学程序设计竞赛网络预赛