Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

//Sliceconvtof ...
func Sliceconvtof() []float64 {
	strs := strings.Split(sc.Text(), " ")

	var flts []float64
	var x int

	for _, s := range strs {
		x, _ = strconv.Atoi(s)
		xf := float64(x)
		flts = append(flts, xf)
	}

	return flts
}

//ThirdRoot .
func ThirdRoot(f float64) float64 {
	xn := f / 2
	var dmt float64

	for {
		dmt = math.Pow(xn, 3) - f
		if math.Abs(dmt) < 0.00001*f {
			break
		}

		xn = xn - (dmt / (3 * math.Pow(xn, 2)))
	}

	return xn
}

func main() {

	for sc.Scan() {
		i := Sliceconvtof()
		if i[0] == -1.0 {
			break
		}
		fmt.Printf("%6f\n", ThirdRoot(i[0]))
	}

}

C++: #include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstring>
#include<map>
#include<functional>
#include<stack>
#include<list>
#include<set>
#include<deque>
#include<climits>
using namespace std;

double abso(double n){
	if(n<0) return n*=-1;
	return n;
}

int main(){
	int q;
	double x;
	while(cin>>q,q!=-1){
		x = (double)q/2.0;
		while(abso(x*x*x-q)>=0.00001*q){
			x = x-((x*x*x-q)/(3*x*x));
		}
		printf("%.16lf\n",x);
	}
	return 0;
}

C++: #include <stdio.h>
#include <math.h>
int main(void){
    int q; 
    while(scanf("%d", &q)!= EOF) { 
        double x;       
        x=q/2;    
        if(q == -1)break;
            double xx;       
            while((fabs(x*x*x-q))>=(0.00001*q)){   
                xx=x-((x*x*x-q)/(3*x*x));      
                x=xx;          
            }          
            printf("%.7f\n",x);     
            }    
                
        return 0; 
}

C++: #include <iostream>
#include <cstdio>
using namespace std;

const long long INF = (1 << 31) - 1;

int main ()
{
    double q;
    while (cin >> q, q >= 0) {
        double ub = INF, lb = -1;
        for (int i = 0; i < 1000; i++) {
            double mid  = (ub + lb) / 2.0;
            if (mid * mid * mid > q) {
                ub = mid;
            } else {
                lb = mid;
            }
        }
        printf("%.6f\n", ub);
    }

    return 0;
}

C++: // 2011/05/24 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int q;
		cin >> q;
		if(q==-1)
			break;

		double x = (double)q/2.0;
		while(true){
			double err = x*x*x-(double)q;
			if(err<0.0)
				err *= -1.0;
			if(err<0.00001*(double)q)
				break;

			x = x-err/(3.0*x*x);
		}

		cout.precision(6);
		cout << fixed << x << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>

using namespace std;

int main(){
	
	double q, x;
	
	while(true){
		
		scanf("%lf", &q);
		
		if(q < 0){
			break;
		}
		
		x = q / 2;
		
		while(true){
			if(x * x * x - q < q * 0.00001){
				break;
			}
			x -= (x * x * x - q) / (3 * x * x);
		}
		
		printf("%.10f\n", x);
		
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;

int main() {
	int n;
	double res;
	while (cin >> n) {
		if (n == -1) break;
		res = n / 2.0;

		while (1) {
			res -= (res*res*res - n) / (3 * res*res);
			if (fabs(res*res*res - n) < 0.00001 * n) break;
		}
		printf("%.6lf\n", res);
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<bitset>
using namespace std;
double abs(double a){
    return (a<0)?-a:a;
}
int main(){
    int q;
    while(cin>>q,q!=-1){
        double x=(double)q/2;
        while(true){
            if(0.00001*q-abs(x*x*x-q)>0)break;
            x=x-(x*x*x-q)/(3*x*x);
        }
        cout<<fixed<<x<<endl;
    }
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> P;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
double f(double x,double q){
  return (x-(x*x*x-q)/(3*x*x));
}
double newton(double x,double q){
  double nx = f(x,q);
  if(abs(nx*nx*nx-q)<0.00001*q) return nx;
  else return (newton(nx,q));
}
int main(void){
  int q;
  while(cin>>q){
    if(q==-1) break;
    printf("%lf\n",double(q,(double)1/3));
  }
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
using namespace std;

int main(){
	
 	long long int q;
	double x;
	
	while(cin>>q){
		if(q!=-1){
			x= (double)q/2;
			while(abs(pow(x,3)-q)>=0.00001*q){
				x=x-((pow(x,3)-q)/(3*pow(x,2)));
		}
			printf("%.6f\n",x);
	}
		
		else
			break;
	
	
}
}

C++: #include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;

void solve(long long q) {
    long double x = q / 2.0;
    while(max(x*x*x - q, -(x*x*x - q)) >= 0.00001*q) {
        x = 1.0 * x - (x*x*x - q) / (3 * x*x);
    }
    printf("%.15Lf\n", x);
}

int main() {
    long long q;
    while(~scanf("%lld",&q)) solve(q);
}

C++: #include<iostream>
#include<cmath>
#include<vector>
#include<string>
#include<cstdio>
typedef unsigned long long ull;
#define rep(i,a) for(int i=0;i<a;i++)
#define loop(i,a,b) for(int i=a;i<b;i++)
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1);
const double inf = (int)1e5;

int main(void){
  int N;
  while(cin>>N,N!=-1){
    double q =1.0*N/2;
    int i = 0;
    while(abs(pow(q,3)-N)>eps){
      i++;
      //printf("%.10f\n",q);
      q=q-(pow(q,3)-N)/(3*pow(q,2));
    }
    printf("%.6f\n",q);
  }
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;

int main(){
	int q;
	while(cin>>q,q!=-1){
		double x=q/2.0;
		while(fabs(x*x*x-q)>=0.00001*q)x-=(x*x*x-q)/(3*x*x);
		printf("%.6f\n", x);
	} 
	return 0;
}

C++: #include <stdio.h>
#include <math.h>

int main(void) {

  int q;
  double x_n;

  while(1) {

    scanf("%d",&q);

    if(q==-1) break;

    x_n=(double)q/2.0;

    while(fabs(x_n*x_n*x_n-q)>=0.00001*q) x_n=x_n-(x_n*x_n*x_n-q)/(3*x_n*x_n);

    printf("%lf\n",x_n);

  }

  return 0;

}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
using namespace std;
double q;
double cal(double n){
  double ans;
  while(1){
    ans = n - n/3.0 - q/(3.0*n*n);
    //    cout << ans << endl;
    if(fabs(fabs(n*n*n)-fabs(q)) < 0.00001){
      return fabs(n);
    }
    n = ans;
    
  }
}

int main(){
  while(cin >> q,q != -1){
    cout << cal(q/2.0) << fixed<< setprecision(6) <<endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
    int q;
    while(cin>>q,q!=-1){
        double x=q/2.0;
        while(fabs(x*x*x-q)>=0.00001*q)x-=(x*x*x-q)/(3*x*x);
        printf("%.6f\n",x);
    }
    return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long

int main()
{
    double q,x;
    while(1)
    {
	scanf("%lf",&q);
	if (q==-1)break;
	x=q/2.0;
	while(abs(x*x*x-q)>=0.00001*q)
	{
	    x=x-(x*x*x-q)/(3.0*x*x);
	}
	printf("%f\n",x);
    }
    return 0;
}

C++: #include <iostream>

#define abs(x) ( x>0.000000 ? x : -x )

double third_root( double x, double q) {
	double x2 = (2.0*x + q/(x*x))/3.0; //x - ( x - q/x*x) / 3.0;
	if( abs( x2*x2*x2 - q )<0.00001*q ) return x2;
	std::cout << x2 << std::endl;
	return third_root( x2, q);
}

int main() {
	int n;
	while(1) {
		std::cin >> n;
		if(n==-1) break;
		std::cout << third_root( (double)n / 2.0, (double)n ) << std::endl;
	}
	return 0;
}