#include<stdio.h> int count(int a,int b) { int i=0,count=0; for(i=a;i<=b;i++) { int val=i,sum=0; while(val) { sum+=val%10; val/=10; } if(sum%5==0) { count++; } } return count; } int main() { int a,b; while(scanf("%d%d",&a,&b)!=EOF) { printf("%d",count(a,b)); } return 0; }