#include <stdio.h>
#include <math.h>
int
main()
{
double
a,b,c,d,n,m,x,y;
while
(
scanf
(
"%lf,%lf,%lf,%lf"
,&a,&b,&c,&d)!=EOF)
{
x=0;
m=a*x*x*x+b*x*x+c*x+d;
n=3*a*x*x+2*b*x+c;
y=x-m/n;
while
(
fabs
(x-y)>=1e-5)
{
x=y;
m=a*x*x*x+b*x*x+c*x+d;
n=3*a*x*x+2*b*x+c;
y=x-m/n;
}
printf
(
"%.6lf\n"
,y);
}
return
0;
}
x(n+1)=x(n)-f(x(n))/f'(x(n))