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++: //58
#include<iostream>
#include<cmath>
#include<iomanip>

using namespace std;

int main(){
  for(double q;cin>>q,q!=-1;){
    double x=q/2;
    while(q!=0&&!(fabs(x*x*x-q)<0.00001*q)){
      x=x-(x*x*x-q)/3/x/x;
    }
    cout<<fixed<<setprecision(20)<<x<<endl;
  }
  return 0;
}

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

int main() {
  
  double q;
  while( cin >> q, q >= 0 ) {
    printf("%0.6lf\n", pow( q, 1.0/3 ));
  }
  
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
//    int a;
    double b,c;
    while(cin>>b){
        c=b/2;
        while(fabs(c*c*c-b)>=b*1e-5){
            c=c-(c*c*c-b)/(3*c*c);
        }
        cout<<c<<endl;
    }
}

C++: #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;

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

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

using namespace std;

int main(int argc, char **argv)
{
	float x, q;
	while(cin >> q){
		if(q == -1){
			break;
		}
		x = q/2;
		while(fabs(x*x*x-q) > 0.00001*q){
			x = x-(x*x*x-q)/(3*x*x);
		}
		printf("%.6f\n", x);
	}
	
	return 0;
}

C++: #include <stdio.h>
#define EPS 0.00001

int main(void) {
	int n,i;
	double x[1000];
	double x2;
	double x3;
	while (scanf("%d", &n), n!=-1) {
		x[0] = (double)n / 2;
		i = 0;
		x3 = x[i] * x[i] * x[i];
		while (!(-EPS*(double)n < x3-(double)n && x3-(double)n < EPS*(double)n)){
			x2 = x[i] * x[i];
			x3 = x[i] * x[i] * x[i];
			x[i + 1] = x[i] - ((x3 - n) / (3 * x2));
			i++;
		}
		printf("%f\n", x[i]);
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
//#include <fstream>

using namespace std;

int main()
{
//	cut here before submit 
//	freopen("testcase.tr", "r", stdin);
	double q;

	while (cin >> q &&  q != -1.0 ){
		double x = q/2.;
		while (fabs (x*x*x - q) >= 0.00001*q  ){
			double y = (x*x*x - q)/(3.*x*x);
			x = x - y;
		} // end while

		printf ("%.6f\n", x);
	} // end loop
		
	return 0;
}

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

using namespace std;

int main(){
	int q;
	double xn1,xn;

	while(cin>>q){
		if(q==-1)break;
		xn = q/2.0;
		while(true){
			xn1 = xn - ( (xn*xn*xn - q)/(double)(3*xn*xn) );
			if(fabs(xn1*xn1*xn1 - q)<=0.00001*q){
				break;
			}
			xn = xn1;
		}
		printf("%.6f\n",xn1);
	}
	return 0;
}

/*
Sample Input
15
15
-1
Output for the Sample Input
2.466212
2.466212
*/

C++: //include
//------------------------------------------
#include <bits/stdc++.h> // only for GCC

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;

//container util
//------------------------------------------
#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair

//repetition
//------------------------------------------
#define loop(i,a,b) for(ull i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)
#define iter(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)
#define riter(i,c) for(auto i=(c).rbegin(); i!=(c).rend(); ++i)

//constant
//--------------------------------------------
const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

// output vector
// ------------------------------------------
namespace std {
    template<typename T>ostream&operator<<(ostream&os, vector<T>const&v){
        iter(it,v) os<<*it<<(it+1==v.end()?"":",");
        return os;
    }
    template<typename T, typename U>ostream&operator<<(ostream&os,const pair<T,U>&p){
        return os << "[" << p.dirst << "," << p.second << "]";
    }
}

//clear memory
// ------------------------------------------
#define clr(a,i) memset((a), (i) ,sizeof(a))

int main(){
   double x;
   ull q;
   while(cin >> q && q!=-1){
      x=q/2.0;
      while(abs(pow(x,3)-q)>0.00001*q){
         x=x-(pow(x,3)-q)/(3*pow(x,2));
         //cout << x << endl;
      }
      printf("%.8f\n",x);
   }
}

C++: #include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>

using namespace std;

long double thrt(long double q){
  long double x=q/2.0;
  while(abs(x*x*x-q)>=0.00001*q){
    x-=(x*x*x-q)/(3.0*x*x);
  }
  return x;
}

int main(){
  vector<long double> data;
  long double q;
  while(cin>>q&&(q!=-1)){
    data.push_back(q);
  }
  for(auto q:data){
    cout<<setprecision(7)<<thrt(q)<<endl;
  }

}

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

bool eq(double x, double q){
    return abs(x*x*x-q) < 0.00001*q;
}

int main(){
    double n;
    while( scanf("%lf", &n), n > 0 ){
        double x = n/2;
        while( true ){
             x = x - (x*x*x-n)/(3*x*x);
             if( eq(x, n) ) break;
         }
        printf("%lf\n", x);
    }
    return 0;
}

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

int main(){
	while(1){
		long q;
		scanf(" %ld", &q);
		if(q==-1) break;
		
		double x=q/2.0;
		while( fabs(x*x*x-q) >= q*pow(10,-5) ){
			x = x-(x*x*x-q)/(3*x*x);
			//printf("now:%lf\n", x);
		}
		
		printf("%lf\n", x);
	}
	
	return 0;
}

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

int main(){
	double x, q, y;
	while(scanf("%lf", &q), q >= 0.0){
		x = 0.5 * q;
		while(1){
			y = x * x * x - q;
			if(abs(y) < 1e-5 * q){
				break;
			}
			x -= y / (3.0 * x * x);
		}
		printf("%.6f\n", x);
	}
}

C++: #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cctype>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>

using namespace std;
const int dx[] = {1,0,-1,0},dy[] = {0,1,0,-1};
#define INF 999999
#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<k;i++)
typedef long long ll;
typedef unsigned long long ull;

int main(){
    double x;
    while(scanf("%lf",&x), x != -1.0){
        double dp[100000]={0.0};
        dp[0] = x*0.5;
        int cnt = 0;
        while(abs(dp[cnt]*dp[cnt]*dp[cnt]) - x >= 0.00001*x){
            cnt++;
            dp[cnt] = dp[cnt-1] - (((dp[cnt-1])*(dp[cnt-1])*(dp[cnt-1])-x)/(3*(dp[cnt-1])*(dp[cnt-1])));
        }
        printf("%lf\n",dp[cnt]);
    }
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

double q;

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