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

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

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

int main()
{	
	double q;

	cin >> q;

	while (q > 0) {
		double d = q, x = q / 2;

		while (d >= 0.00001 * q) {
			x = x - (pow(x, 3) - q) / (3 * x * x);
			d = abs(pow(x, 3) - q);
		}

		cout << fixed << setprecision(7) << x << endl;

		cin >> q;
	}

	return 0;
}

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

#define ABS(a) ((a)<0?(-(a)):(a))

int main(){
    while(1){
	double q;
	cin >> q;
	if(q == -1)return 0;
	double a = q / 2;
	while(true){
	    a = a - (a*a*a - q)/(3*a*a);
	    if(ABS(a * a * a - q) < q * 0.00001)break;
	}
	printf("%.9lf\n", a);
    }
}

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

using namespace std;

int main()
{
    int q; double x;
    
    while(true)
    {
        cin >> q;
        
        if(q == -1) { break; }
        
        x = q / 2.0;
        
        while(abs(x * x * x - q) >= 0.00001 * q)
        {
            x = x - (x * x * x - q) / (3 * x * x);
        }
        
        cout << fixed << setprecision(12) << x << endl;
    }
    
    return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
using namespace std;
double q;
double cal(double n){
  double ans;
  while(1){
    ans = n - n/3.0 - q/(3.0*n*n);
    //    cout << ans << endl;
    if(fabs(fabs(n*n*n)-fabs(q)) < 0.00001){
      return fabs(n);
    }
    n = ans;
    
  }
}

int main(){
  while(cin >> q,q != -1){
    cout  << fixed << setprecision(7) << cal(q/2.0) << endl;
  }
  return 0;
}

C++: 

#include<stdio.h>
 double abs(double A){
 return A<0.0?-A:A;
 }
 int main(){ 
int a;
 while(scanf("%d",&a),~a){ double p=(double)a/2.0;
 while(1){ p=p-((p*p*p)-(double)a)/(3.0*p*p); 
if(abs(p*p*p-(double)a)<(double)a*0.00001)break;

 //printf("%.6lf\n",p); } printf("%.6lf\n",p);
 } 
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main(){
	double x,q;
	
	while(cin>>q){
		if(q==-1)break;
		
		x=q/2;
		
		
		while(fabs( x*x*x-q ) >= 0.00001f){
			x = x - (x*x*x-q)/(3*x*x);
		}
		
		cout << x << endl;
	}
}

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

using namespace std;

int main()
{
  double x,q;
  for(;cin>>q,q!=-1;)
    {
      x=q/2;
      for(;abs(x*x*x-q)>=0.00001*q;)
	{
	  x=x-((x*x*x-q)/(3*x*x)); 
	}
      cout<<setprecision(7)<<x<<endl;
      
    }
}

C++: #include <cstdio>
#include <cstdlib>
int main(){
	double r;
	while(scanf("%lf",&r) && r!=-1.0){
		double a=0.0;
		double b=r;
		while(1){
			double mid;
			mid=(a+b)/2;
			if(abs(mid*mid*mid-r)<0.00000001){
				printf("%f\n",mid);
				break;
			}else if(mid*mid*mid>r){
				b=mid;
			}else{
				a=mid;
			}
		}
	}
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<queue>
#include<map>
using namespace std;

int main() {
	double a;
	while (scanf("%lf", &a), a + 1) {
		double b = a / 2;
		for (int c = 0; c < 100; c++) {
			if (abs(b*b*b - a) < a / 100000)break;
			double d = b*b*b - a, e = b*b * 3;
			b -= d / e;
		}
		printf("%.10lf\n", b);
	}
}

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

/** Problem0080 : Third Root **/
int main()
{
	double x, oldX, in;
	
	while (cin >> in) {
		if (in == -1) break;
		
		oldX = in/2.0;
		for (;;) {
			x = oldX - (oldX*oldX*oldX-in)/(3*oldX*oldX);
			
			if (x*x*x > in) {
				if (x*x*x - in < 0.00001*in)
					break;
				else
					oldX = x;
			} else {
				if (in - x*x*x < 0.00001*in)
					break;
				else
					oldX = x;
			}
		}
		printf("%.6lf\n", x);
	}
	
	return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

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

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

int main() {
	double q;
	while (true) {
		cin >> q;
		if (q == -1) {
			break;
		}
		double x_p;
		double x_n = q / 2;
		double limit = 0.00001 * q;
		while (abs(x_n * x_n * x_n - q) >= limit) {
			x_p = x_n;
			x_n = x_p - (x_p * x_p * x_p - q) / (3 * x_p * x_p);

		}
		cout << fixed << setprecision(6) << x_n << endl;
			
		
	}
	return 0;
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

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

void solve() {
  double q;
  while (cin >> q, q != -1) {
    double x = f(q / 2, q);
    while (abs(x * x * x - q) >= 0.00001 * q) {
      x = f(x, q);
    }
    cout << prec(8) << x << endl;
  }
}

C++: #include<bits/stdc++.h>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(){
	double q,alt1,alt2;
	while(1){
		cin>>q;
		if(q==-1)break;
		alt1=q/2;
		alt2=alt1-(pow(alt1,3)-q)/(3*pow(alt1,2));
		while(abs(alt2-alt1)>=0.000001){
			alt1=alt2;
			alt2=alt1-(pow(alt1,3)-q)/(3*pow(alt1,2));
		}
		printf("%.6f\n",alt2);
	}
	return 0;
}