#include<iostream>
#include<cmath>
bool estePrim(uint32_t numar)
{
if(numar == 1 || numar == 0) return false;
for(uint32_t divizor = 2; divizor <= std::sqrt(numar); ++divizor)
if(numar % divizor == 0)
return false;
return true;
}
int main()
{
uint32_t a, b, suma = 0, nrPrime = 0;
std::cin >> a >> b;
for(uint32_t numarCurent = a; numarCurent <= b; ++numarCurent)
if(estePrim(numarCurent))
suma += numarCurent, ++nrPrime;
std::cout << static_cast<float>(suma) / nrPrime << '\n';
return 0;
}