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