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<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(){

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

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

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

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

#define EPS 1e-5

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

C++: #include<cstdio>
#include<cmath>
int main(){
	int q;float x;
	for(;scanf("%d",&q),~q;printf("%f\n",x))
		for(x=q/2.;fabs(x*x*x-q)>1e-5*q;x-=(x*x*x-q)/3./x/x);
}

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;
		double x=q/2;
		while(true){
			if(fabs(pow(x,3.0)-q)< 0.00001*q)break;
			x =x-(pow(x,3.0)-q)/(3*pow(x,2.0));
		}
		printf("%,7f\n",x);
	}

	return 0;
}

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

int main(){
	int n;
	double q,a,b,c;
	while(cin >> n, n != -1){
		q = (double)(n) / 2.0;
		while(abs(q * q * q - (double)(n)) > (0.00001 * n)){
		/*	a = q * q * q;
			b = q * q;
			c = (a - q)/(3 * b);*/
			q = q - (q * q * q - (double)(n))/(3 * q * q);
		}
		cout << fixed << setprecision(6) << q << endl;
	}
}

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

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

double formula(double beforeX) {
    return(beforeX - ((beforeX*beforeX*beforeX-q) / (double)(3.0*beforeX*beforeX)));
}

void solve() {
    double nowx = q / 2.0;
    while(true) {
        nowx = formula(nowx);
        if(isEnoughSmall(nowx)) break;
        //printf("exec:%.6f\n", nowx);
    }
    printf("%.6f\n", nowx);
}

int main(void) {
    while(cin >> q, q != -1) {
        solve();
    }
    return(0);
}

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

void compute(int q){
  double x = 1.0*q/2;
  while(1){
    if ( fabs(x*x*x - q) < EPS ) break;
    x = x - (x*x*x - q)/(3*x*x);
  }
  printf("%.6lf\n", x);
}

main(){
  int q;
  while( cin >> q && q >= 0 ) compute(q);
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<string>
#include<sstream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cctype>
#include<climits>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
#define P pair<int, int>
const int INF = INT_MAX / 2;

int main(){
    int q;
    while(cin >>q && q != -1){
        double bef = q / 2;
        double stp = sqrt(0.00001 * q);
        while(sqrt((bef * bef * bef) - q) > stp){
            bef = bef - ((bef * bef * bef - q) / (3 * bef * bef));
        }
        printf("%.6lf\n", bef);
    }
    return 0;
}

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() {
	double q;
	while (cin >> q, q != -1) {
		double x = q / 2;
		while (abs(x*x*x - q) >= (1e-5)*q) {
			x = (x - (x*x*x - q) / (3 * x*x));
		}
		cout << fixed << setprecision(8) << x << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
  
using namespace std;
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)
  
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()
  
#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

#define INF 1000000000

typedef double Real;
#define EPS 1e-11
#define EQ(x) (-EPS<x && x<EPS)
typedef complex<Real> P;
Real dot(P a,P b){return real(conj(a)*b);}
Real cross(P a,P b){return imag(conj(a)*b);}

int main(){
  cout.precision(12);
  while(true){
    Real x;
    cin>>x;
    if(x==-1)break;
    Real a = x/2;
    while(abs(a*a*a-x)>1e-7){
      a = a-(a*a*a-x)/(3*a*a);
    }
    cout<<fixed<<a<<endl;
  }
  return 0;
}

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

using namespace std;

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

    double x = q / 2;
    while (0.00001 * q <= abs(pow(x, 3) - q))
      x -= (pow(x, 3) - q) / (3 * x * x);

    printf("%.10lf\n", x);
  }
}