#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long x,y;
cin>>x>>y;
if(x+24000>=y){
cout<<5;
return 0;
}
if(x+36000>=y){
cout<<6;
return 0;
}
if(x+48000>=y){
cout<<8;
return 0;
}
if(x+72000>=y){
cout<<10;
return 0;
}
else{
cout<<(((y-x-1)/2)/48000+1)*13;
return 0;
}
return 0;
}