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 <cmath>
#define EQ(a,b) (abs(a - b) < 0.000000001)
using namespace std;

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

    return 0;
}

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

int main() {
	long long int q;
	double ans;
	while(1){
		cin >> q;
		if(q==-1) break;
		double s = (double)q/2;
		while(1){
			ans = s - (s*s*s-q)/(3*s*s);
			if(ans < 0.00001*q) break;
			s = ans;
		}
		printf("%.6f\n",ans);
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(){
	double q,alt1,alt2;
	while(1){
		cin>>q;
		if(q==-1)break;
		alt1=q/2;
		alt2=alt1-(pow(alt1,3)-q)/(3*pow(alt1,2));
		while(abs(alt2-alt1)>=0.00000001*q){
			alt1=alt2;
			alt2=alt1-(pow(alt1,3)-q)/(3*pow(alt1,2));
		}
		printf("%.6f\n",alt2);
	}
	return 0;
}

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

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);

#define CLR(a) memset((a), 0 ,sizeof(a))

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};

int main() {
  int q;

  while(cin >> q, q != -1) {
    double x = q/2;
    while(!(abs(x*x*x-q) < 0.00001*q)) {
      x = x - (x*x*x-q)/(3*x*x);
    }
    printf("%lf\n", x);
  }  
}

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

using namespace std;

int main()
{
  int a;

  while(cin >> a)
  {
    if(a == -1) { goto Exit; }

    cout << pow(a, 1.0 / 3.0) << endl;
  }

Exit:;

  return 0;
}

C++: #include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,b,n) for(int i=b;i<n;i++)

using namespace std;

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

const int INF=1<<29;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

int main(){
	ll q;
	while(cin>>q){
		if(q==-1)break;
		const double EPS=(1e-5);
		double x=q/2;
		while(true){
			x =x-(pow(x,3)-q)/(3*pow(x,2));
			if(fabs(pow(x,3)-q)<EPS*q)break;
		}
		printf("%,7f\n",x);
	}

	return 0;
}

C++:  #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 #include<deque>
 #include<functional>
 #include<utility>
 
 using namespace std;
 
 double abs(double x)
 {
   if(x>=0) return x;
   else return -x;       
 }
 
 int main()
 {
   long long int q;
   while(cin>>q&&(q!=-1))
   {
     double x;
     x=(1.0*q)/2;
     while(abs(pow(x,3)-q)>=(0.00001*q))
     {
       x=1.0*2/3*x+q/(3*x*x);                                
     }                        
     printf("%.6lf\n",x);
   }
   //while(1);
   return 0; 
 }

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

C++: 



#include<stdio.h>
 double abs(double A){
 return A<0.0?-A:A; } 
int main()
{ 
int a;
 while(scanf("%d",&a),~a){
 double p=(double)a/2.0; 
while(1){ 
p=p-((p*p*p)-(double)a)/(3.0*p*p);
 if(abs(p*p*p-(double)a)<(double)a*0.00001)break;
 //printf("%.6lf\n",p); } printf("%.6lf\n",p);
 } 
}

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

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define each(it,c) for(auto it=(c).begin();it!=(c).end();it++)
#define all(c) c.begin(),c.end()
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);
const double EPS = 1e-10;

signed main() {
	cout << setprecision(8) << endl;
	double q;
	while (cin >> q, q != -1) {
		double x = q / 2;
		while (abs(x*x*x - q) >= (0.000001)*q) {
			x = x - ((x*x*x - q) / (3 * x*x));
		}
		cout << x << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
#define rep2(x,from,to) for(int x = (from); x < (to); ++(x))
#define rep(x,to) rep2(x,0,to)
int main() {
	double q;
	while(cin >> q && q != -1) {
		double x = q/2;
		while(abs(x*x*x-q) >= 0.00001*q) {
			x = x - (x*x*x-q)/(3*x*x);
		}
		printf("%.6lf\n", x);
	}
	return 0;
}

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

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