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 <cmath>

#define SQ(x) (x)*(x)
#define CU(x) (x)*(x)*(x)

using namespace std;

int main(void){
    int q;
    double x;
    double x_a;
    
    while(cin>>q,q!=-1){
        x=q/2.0;
        x_a=abs(CU(x)-q);
        while(x_a>=0.00001*q){
            x=x-(CU(x)-q)/(3*SQ(x));
            x_a=abs(CU(x)-q);
        }
        cout<<x<<endl;
    }
    return(0);
}

C++: #include <cmath>
#include <iomanip>
#include <iostream>
 
using namespace std;
 
int main()
{
  int a;
 
  while(cin >> a)
  {
    if(a == -1) { goto Exit; }
 
    cout << setprecision(15) << pow(a, 1.0 / 3.0) << endl;
  }
 
Exit:;
 
  return 0;
}

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

int main(){
    int a;
    double b,c;
    while(cin>>a&&a!=-1){
        b=a
        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++: #include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>     
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define ld long double
#define rep(a,t) for(int a=0;a<t;a++) 
#define forever while(true)
#define Sort(a) sort(a.begin(),a.end())
#define Reverse(a) reverse(a.begin(),a.end())
#define pb push_back
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	double a = 0;
	while (true) {
		cin >> a;
		if (a == -1) { break; }
		double x = a / (double)2;
		while (abs(x * x * x - a) >= 0.00001*a) {
			x = x - (x * x * x - a) / (3 * x * x);
		}
		cout << x << endl;
	}
	return 0;
}

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){
		printf("%.9f\n",pow(n,0.33333333333));
	}
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main()
{
//	cut here before submit 
//	freopen ("testcase.third_root", "r", stdin );
	while (1 ){
		int q;
		scanf ("%d", &q );
		if (q == -1 ) break;
		double x = (double)q/2.;
		while (fabs (x*x*x - (double)q) >= 0.00001*(double)q ){
			double y = (x*x*x - (double)q)/(3.*x*x);
			x = x - y;
		} // end while
		printf ("%.9lf\n", x );
	} // end loop
		
	return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define LOOP(i) while(i--)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	//cin.tie(0);
	//ios::sync_with_stdio(false);

	while(true){
		int V=in();
		if(V==-1) break;

		double DV=V/2.0;
		while(abs(DV*DV*DV-V)>=0.00001*V){
			double DV2 = DV-(DV*DV*DV-V)/(3.0*DV*DV);
			DV = DV2;
		}
		printf("%.8lf\n",DV);
	}
	return 0;
}

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

int main(){
	double q, x;
	while(1){
		scanf("%lf", &q);
		if( q == -1.0 ){
			break;
		}
		x = q / 2.0;
		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 <iostream>
#include <stdio.h>
#include <math.h>
#include <iomanip>

using namespace std;

double third_root(double xn, double q){
    if((xn*xn*xn-q)>-0.00001*q  &&  (xn*xn*xn-q)<0.00001*q){
        return xn;
    }
    
    xn = xn-((xn*xn*xn-q))/(3.0*xn*xn);
    return third_root(xn, q);
    
}


int main(void)
{
    long long int q;
    while(cin>>q){
        if(q==-1)break;
        printf("%.6f\n",third_root((double)q/2.0, (double)q));
    }
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <ctime>
using namespace std;

#define rep(i,a,n) for(int i=a; i<n; i++)
#define repr(i,a,n) for(int i=a; i>=n; i--)
#define pb(a) push_back(a)
#define fr first
#define sc second
#define INF 999999999

#define X real()
#define Y imag()
#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )
#define LE(n, m) ((n) < (m) + EPS)
#define GE(n, m) ((n) + EPS > (m))

typedef vector<int> VI;
typedef vector<VI> MAT;
typedef pair<int, int> pii;
typedef long long int ll;

typedef complex<double> P;
typedef pair<P, P> L;
typedef pair<P, double> C;

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

namespace std {
    bool operator<(const P a, const P b) {
        return a.X != b.X ? a.X < b.X : a.Y < b.Y;
    }
}

int main() {
    int n;
    while(cin >> n) {
        if(n == -1) break;
        double ans = n / 2.0;
        while(abs(pow(ans, 3) - n) >= 0.00001 * n)
            ans = ans - (pow(ans, 3) - n) / (3 * pow(ans, 2));
        printf("%.8f\n",ans);
    }
    return 0;
}