float g(float x);
float f(float x);
#define e .00001
#include<math.h>
void main()
{
float x0,x1;
clrscr();
scanf("%f" ,&x0);
x1=f(x0);
while(fabs((x1-x0)/x1) > e )
{
x0=x1;
x1=x0-f(x0)/g(x0);
}
printf("%f",x1);
getch();
}

float f(float x)
{        return x*x*x-3*x-5;
}
float g(float x)
{
 return 3*x*x-3;
}

