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 <algorithm>
#include <cmath>
using namespace std;


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

double solve(double q) {
  double x = q/2.0;
  while(!isEnoughSmall(q,x)) x = x - (x*x*x-q)/(3.0*x*x);
  return x;
}

int main() {
  double q;
  while(cin >> q && q != -1) printf("%.6f\n", solve(q));
  return 0;
}

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

int main(){
    while(1){
	double q;
	cin >> q;
	if(q == -1)return 0;
	double a = q / 2;
	for(int i = 0;i < 50000000;i++){
	    a = a - (a*a*a - q)/(3*a*a);
	}
	printf("%.9lf\n", a);
	cout << a * a * a << endl;
    }
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	ll n;
	while(cin>>n,n+1){
		double q=n,x=q/2.0;
		while(abs(x*x*x-q)>0.0000001*q){
			x-=(x*x*x-q)/(3*x*x);
		}
		printf("%.9f\n",x);
	}
}

C++: #include <cstdio>
#include <cmath> 
using namespace std; 
int main() {
double q,x; 
while(scanf("%lf",&q), q!=-1) {
x=q/2.0; 
while(abs(x*x*x-q) >= 0.00001*q) { 
x = x-(x*x*x-q)/(3*x*x); 
} 
printf("%.6lf\n",x); 
} 
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
#include <numeric>
#include <sstream>
#include <queue>
#include <iomanip>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()
#define print(s) cout << (s) << endl

double q;

double iter(double x) {
    return x - (x*x*x-q)/(3*x*x);
}

int main() {
    while(cin >> q, q+1) {
        double x = q/2;
        while (abs(x*x*x - q) >= 0.00001*q) {
            x = iter(x);
        }
        printf("%.6f\n", x);
    }
    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.0;
    while(abs(a*a*a-x)>=0.00001*x){
      a = a-(a*a*a-x)/(3.0*a*a);
    }
    cout<<fixed<<a<<endl;
  }
  return 0;
}

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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T, class S> inline bool minup(T& m, S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, S x){ return m<(T)x ? (m=(T)x, true) : false; }

const int    INF = 1000000000;
const ll     MOD = 1000000007LL;
const double EPS = 1E-5;

double q;
double prev;

template<typename T> T add(T x, T y){ if(abs(x+y) < EPS*q*(abs(x)+abs(y))) return 0; return x + y; }
template<typename T> inline bool semieq(T x, T y){ return abs(x - y) < EPS*q; }
template<typename T> inline bool semige(T x, T y){ return x - y > -EPS; }
template<typename T> inline bool semile(T x, T y){ return y - x > -EPS; }

inline double next(double x, double q){ return x - ((x * x * x - q) / ( 3 * x * x)); }

int main()
{
  while((cin >> q) && q > 0.0){
    double res = q / 2.0;
    while(!semieq(res*res*res, q)) res = next(res, q);
    printf("%.15f\n", res);
  }

  return 0;
}

C++: #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define ALL(a) (a).begin(),(a).end()
#define INF 1000000001
#define MOD 10000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
const ull B=100000007;
double rec(double x,int q){
      return x-((x*x*x-q)/(3.0*x*x));
}
int main(){
      int q;
      while(cin>>q&&q!=-1){
            double x=((double)q/2.0,(double)q);
            REP(i,100000){
                  x=rec(x,q);
            }
            printf("%.10f\n",x);
      }
}

C++: //Third Root
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
  ll q;
  while(cin>>q){
    if(q==-1)break;
    double x=q/2.0;
    while(fabs(pow(x, 3.0)-q)>=0.00001*q){
      x=x-(pow(x, 3.0)-q)/(3.0*x*x);
    }
    printf("%.8f\n", x);
  }
  return 0;
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
#define EPS 1e-5
using namespace std;

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

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("%.15f\n", x);
	}
}

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) >= 1e-5*q) {
			x = x - ((x*x*x - q) / (3 * x*x));
		}
		cout << x << endl;
	}
	return 0;
}