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 <iomanip>
#include <iostream>

using std::cin;
using std::cout;
using std::endl;
using std::ios_base;
using std::setiosflags;
using std::setprecision;

double third_root(double q,int i) {
	if (i == 1) {
		return q/2;
	}
	double x = third_root(q,i-1);
	return x - (x*x*x - q)/(3*x*x);
}

int main() {
	int q;
	while (cin >> q && ~q) {
		cout << setiosflags(ios_base::fixed) << setprecision(6) << third_root((double)q,100) << endl;
	}
}

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

int main()
{
    int q;
    while(cin >> q)
    {
        if(q==-1)break;
        double qz = (double)q;
        double x=1;
        double e;
        while(1)
        {
            e = x*x*x-qz;
            x= x-e/(3*x*x);
            if(fabs(e)*200000 < qz) break;
        }
        printf("%6f\n",x);
    }
    

    return 0;
}

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

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <iterator>
#include <bitset>
#include <complex>
#include <fstream>
#include <iomanip>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#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++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

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

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

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

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

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

using std::cin;
using std::cout;
using std::endl;
using std::ios_base;
using std::setiosflags;
using std::setprecision;

double third_root(double q,int i) {
	if (i == 1) {
		return q/2;
	}
	double x = third_root(q,i-1);
	return x - (x*x*x - q)/(3*x*x);
}

int main() {
	int q;
	while (cin >> q && ~q) {
		cout << setiosflags(ios_base::fixed) << setprecision(6) << third_root((double)q,100000) << endl;
	}
}

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  <<fixed<< setprecision(8);
	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 <cmath>
#include <cstdio>
using namespace std;
 
int main()
{
  int q;
  while (cin >> q, q != -1){
    double x = q / 2.0;
    while (fabs(pow(x, 3) - q) >= 0.00001 * q){
      x = x - (pow(x, 3) - q) / (3 * x * x);
    }
    printf("%f\n", x);
  }
  return (0);
}

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

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<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/3-q/3/x/x);
}

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-9){
      a = a-(a*a*a-x)/(3*a*a);
    }
    cout<<fixed<<a<<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 long 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-9){
      a = a-(a*a*a-x)/(3*a*a);
    }
    cout<<fixed<<a<<endl;;
  }
  return 0;
}