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 <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("%.7f\n",zenka(q));
       }
   }
     return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
#define int ll

signed main(void)
{
  while(true) {
    long double q;
    cin >> q;
    if(q == -1) break;
    long double a = q/2;
    REP(i, 1000000) {
      a = a-(a*a*a-q)/(3*a*a);
    }
    cout << fixed << setprecision(15) << a << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;
//#define EPS 1E-6
int main()
{
//	cut here before submit 
//	freopen("testcase.tr", "r", stdin);
	string str = "";
	while (getline (cin, str ) ){
		double q;
		stringstream ss(str);
		ss >> q;
		if (q == -1.0){
			break;
		} // end if

		double x = q/2.;

//		cout << "x: " << x << endl;
		while (fabs (x*x*x - q) >= 0.00001*q  ){
			double y = (x*x*x - q)/(3.*x*x);
			x = x - y;
//			cout << "x: " << x << endl;
//			printf ("x: %.6f\n", x);
		} // end while

		printf ("%.6f\n", x);

//		cout << x << endl;

	} // end loop

//	cout << res << endl;	
		
	return 0;
}

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

int main(void){
	int q;

	while(scanf("%d", &q)){
		if(q == -1) break;
		double x = 0;
		x = floor(q/2);
		while(x*x*x - q >= 0.00001*q){
			x = x - (x*x*x - q) / (3*x*x);
		}
		printf("%.6f\n", x);
	}


	return 0;
}

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

void solve(long long q) {
    long double x = q / 2.0;
    while(abs(x*x*x - q) >= 0.00001*q) {
        x = 1.0 * x - (x*x*x - q) / (3 * x*x);
    }
    printf("%Lf\n", x);
}

int main() {
    long long q;
    while(~scanf("%lld",&q)) solve(q);
}

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

using namespace std;

int main() {
	long double q;
	while (cin >> q) {
		if (q == (long double)-1.0) {
			break;
		}
		long double x = q / (long double)2.0;
		x = x - (((q*q)-(long double)1.0)/((long double)16.0*x*x))*q;
		while (fabs(x*x*x-q) >= 0.00001*q) {
			x = x - (x*x*x-q)/((long double)3.0*x*x);
		}
		printf("%.6lf\n", x);
	}
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<cmath>
#define EPS 0.00001
using namespace std;
typedef long long ll;

bool eq(double x,double y){
  if(abs(x-y)<EPS)return true;
  else return false;
}

ll n;
double q;
double t[10000];
int main(){
  while(cin>>n){
    if(n==-1)break;
    t[1]=n/2.0;
    for(int i=2;i<100000;i++){
      t[i]=t[i-1]-(t[i-1]*t[i-1]*t[i-1]-(double)n)/(3.0*t[i-1]*t[i-1]);

      if(eq(t[i]*t[i]*t[i],n)){
	//cout<<t[i]<<endl;
	printf("%.6f\n",t[i]);
	break;
      }
    }
    
  }
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#define EPS 1e-9
using namespace std;
typedef long long ll;

double eps, alterX;
ll q;

//漸化式
double formula() {
    return(alterX - ((alterX*alterX*alterX - q) / (3 * (alterX*alterX))));
}
//ループ
void solve() {
    while(sqrt(alterX*alterX*alterX - q) > eps) { //|x^3 - q| <= epsの時終了
        alterX = formula();
    }
}
//出力
void output(double ans) {
    printf("%.6lf\n", ans);
}

int main(void) {
    while(cin >> q, q != -1) {
        alterX = q / 2.0; //X1
        eps = sqrt(q / 100000.0); //EPS
        
        solve();
        output(alterX - EPS);
    }
    return(0);
}

C++: #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<int, int>P;

int main() {
	double q;
	while (cin >> q, q >= 0) {
		printf("%.6lf\n", cbrt(q));
	}
}

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

int main(){
	cout << fixed;
	cout << setprecision(10);
	while(1){
		int q;
		cin >> q;
		if(q == -1) break;
		
		double x = (double)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;
}

C++: #include<stdio.h>
#include<math.h>
int main(void)
{
	double q, x, eq;
	while(scanf("%lf",&q),q>0)
	{
		x = q/2;
		eq = q*0.00001;
		while(fabs(x*x*x-q) >= eq)
			x -= (x*x*x-q)/(3*x*x);
		printf("%f\n", x);
	}
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>

using namespace std;

int main(){
	int n;
	while(cin>>n,~n){
		if(n == 0){ puts("0"); continue; }
		double a,b = n;
		do{
			a = b;
			b = a - (a*a*a-n)/(3*a*a);
		}while(abs(b*b*b-n) >= 0.00001*n);

		printf("%.6f\n",b);
	}
    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-12;

template<typename T> T add(T x, T y){ if(abs(x+y) < EPS*(abs(x)+abs(y))) return 0; return x + y; }
template<typename T> inline bool semieq(T x, T y){ return abs(x - y) < EPS; }
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)); }

double q;
double prev;

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

  return 0;
}