//第3题,5%—10%小费
#include<iostream>
#include <stdio.h>
using namespace std;


int main() {
	long a, b, count, start;
	long double min, max;
	while(cin>>a>>b) {
		count = 0;
		min = a*(1.0+0.05/0.95);
		max = a*(1+0.1/0.9);
		start = long(min/5);
		start *= 5;
		for (long i = start; i <= max && i <= b; i +=5) {
			if (min <= i && max >= i && i <= b) {
				count++;
			}
		}
		cout<<count<<endl;
	}
}



//第4题,圆形魔法 #include<iostream>
#include <stdio.h>
#include<math.h>
using namespace std;


int main() {
	int count;
	long s, y;
	long double k;
	while(cin>>s) {
		count = 0;
		k = sqrt(s/2.0);
		for (long x = 1; x < k-0.01; ++x) {
			y = (int)sqrt((s-x*x)*1.0);
			if ( x*x+y*y == s ) {
				count++;
			}
		}
		count*=8;
		
		if (sqrt(s*1.0) == (int)sqrt(s*1.0)) {
			count+=4;
		}
		if (sqrt(s*2.0) == (int)sqrt(s*2.0)) {
			count+=4;
		}
		
		cout<<count<<endl;
	}
}