http://noi.openjudge.cn/math/7657/
/*
小学奥数 7657 连乘积末尾0的个数-2022.01.26
http://noi.openjudge.cn/math/7657/
*/
#include<bits/stdc++.h>
using namespace std;
long long a,b,j5,j2,k;
int main()
{
//输入
cin>>a>>b;
for(int i=a;i<=b;i++){
k=i;
while(k%2==0){
k=k/2;
j2++;
}
while(k%5==0){
k=k/5;
j5++;
}
}
//输出
if(j2<j5) cout<<j2;
else cout<<j5;
return 0;
}