#include<iostream>
#include<math.h>
using namespace std;
int main()
{
int n=2;
double eps,t,s=0,x;
scanf("%lf %lf",&x,&eps);
t=x;
s=t;
while(fabs(t/2*n)>=eps)
{
t=-t*(2*n-3)*x*x/(2*n-2);
s=s+t/(2*n);
n++;
}
printf("%d,%lf\n",n,s);
return 0;
}