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

using namespace std;
int main()
{
int a, b;
//freopen ("squares.in", "r", stdin);
//freopen ("squares.out", "w", stdout);
scanf ("%d %d", &a, &b);
int c, d;
int count=0;
c = (int)sqrt((double)a);
d = (int)sqrt((double)b);
//int i=0;
count = d-c;
//for (i; i<=d; i++)
//	if (((i*i)>a)&&((i*i)<=b)) count++;
printf ("%d", count);
//getch();
return 0;
}