#include <iostream>
#include <math.h>

long a[3];

int main()
{
	int k = 0, s = 0;
	freopen("squares.in", "r", stdin);
	freopen("squares.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	for(int i = 1; i <= 2; i++)
		scanf("%ld", &a[i]);
	k = (int)sqrt(a[2]+0.1);
	if(a[1] != 0)
		s = (int)sqrt(a[1]-0.1);
	else
		s = 0;
	k = k - s;
	printf("%d", k);


	return 0;
}