/*
  AOJ 2123
  Title:Divisor Function
  @kankichi573
*/
#include <stdio.h>
#include <float.h>
#define max(x,y) (((x)>(y))?(x):(y))

#define NPRIME 13
double ret;

int prime[NPRIME]={2,3,5,7,11,13,17,19,23,29,31,37,41};
 
void solve(long long n,int prime_c,double val,double sum)
{
  long long prime_power;     
  long long prime_power_sum; 

  //printf(":%lld %d %lf %lf\n",n,prime_c,val,sum); 
  if (val > n || prime_c == NPRIME)
    return;
  ret=max(ret,sum/val);

  prime_power=prime_power_sum =1;
  while(1)
    {
      if(prime_power> n/val)
	break;
      if(prime_power !=1)
	solve(n,prime_c+1,val*prime_power,sum*prime_power_sum);
      prime_power *= prime[prime_c];
      prime_power_sum += prime_power;
    }
}
 
main()
{
  int i;
  long long  n;

  while(scanf("%lld",&n) && n)
    {
      ret = 1;
      solve(n,0,1,1);
      printf("%.6lf\n",ret);
    }
  return(0);
}