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++: #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 <bits/stdc++.h>

using namespace std;

int main()
{
  double num, x0, x1 ;//?????°??£?¨?
  while(cin >> num)//??????????§?
  {
    if(num == -1) break;
    else{
      x0 = num/2.0 ;//?????????
      while(1){
        x1 = x0 - (pow(x0,3.0)-num)/(3*pow(x0,2.0)) ;//?????\????????????
        if(abs(pow(x1,3.0)-num)< 0.00001*num)//???????????¶?¢????
        {
          break ;
        }
        x0 = x1 ;//???????????????????????´????¬?????¨?????????????
      }
      cout<<fixed<<setprecision(8)<< x1 <<endl;
    }
  }
  return 0 ;
}

C++: #include<cstdio>
#define eps 0.00001
double q;

double fabs(double a){
	if(a<0)return -a;
	return a;
}

int main(void){
	while(1){
		scanf("%lf",&q);
		if(q==-1)break;
		double x=q/2;
		while(fabs(x*x*x-q)>=eps*q){
			x=x-(x*x*x-q)/(3*x*x);
		}
		printf("%0.10f\n",x);
	}
	return 0;
}

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

double abso(double n){
	if(n<0) return n*=-1;
	return n;
}

int main(){
	long long q;
	double x;
	while(cin>>q,q!=-1){
		x = q/2;
		while(abso(x*x*x-q)>=0.000001*q){
			x = x-((x*x*x-q)/(3*x*x));
		}
		printf("%.16lf\n",x);
	}
	return 0;
}

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

double abs(double x) {
    if (x < 0) return -x;
    return x;
}

#define EPS 1e-6
double solve(double x, double q) {
    stack<double> st;
    st.push(x);
    int count = 0;
    while (!st.empty()) {
        double _x = st.top(); st.pop();
//        cout << _x << endl;
        if (abs(_x * _x * _x - q) < q * EPS) return _x;
        st.push(_x - (_x * _x * _x - q) / (3 * _x * _x));
    }
}

int main() {
    int q;
    while (cin >> q) {
        if (q == -1) break;
        cout << setprecision(7) << solve(q / 2.0, q) << endl;
    }
    return 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("%.10f\n", solve(q));
  return 0;
}

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

using namespace std;

typedef int LL;
typedef double LD;

int main(){

	LL q;
	LD x;

	while(1){

		cin>>q;
		if(q==-1) break;

		x=(LD)q/2.0;
		while(abs(x*x*x-q)>=0.00001*q){
			x=x-(x*x*x-q)/(3.0*x*x);
		}
		printf("%.6lf\n",x);
	}
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;

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

C++: #include <iostream>
#include <stdio.h>
#include <math.h>

using namespace std;

void solve()
{
	double q;
	while(cin >> q, q != -1)
	{
		double x1 = q / 2;
		while(true)
		{
			if(fabs(x1 * x1 * x1 - q) < 0.00001 * q)
			{
				printf("%.6f\n", x1);
				break;
			}
			x1 = x1 - (x1 * x1 * x1 - q) / (3 * x1 * x1);
		}
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <queue>
#include <cmath>
#include <set>
#include <map>
#include <cstdlib>
#include <cstdio>
using namespace std;

const double EPS = 1e-9;

double tr(double xn, double q){
	double xn2 = xn*xn;
	double xn3 = xn2*xn;
	if(abs(xn3 - q) < 0.00001*q + EPS){
		return xn;
	}
	return tr(xn-(xn3-q)/(3.0*xn2), q);
}

int main(){
	int q;
	while(cin >> q, q != -1){
		cout << tr(q/2.0, q) << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<cmath>
#include<vector>
#include<string>
#include<cstdio>
typedef unsigned long long ull;
#define rep(i,a) for(int i=0;i<a;i++)
#define loop(i,a,b) for(int i=a;i<b;i++)
using namespace std;
const double eps = 1e-10;
const double pi = acos(-1);
const double inf = (int)1e5;

int main(void){
  int N;
  while(cin>>N,N!=-1){
    double q =1.0*N/2;
    int i = 0;
    while(pow(q,3)-q>eps && i < 10){
      i++;
      q=q-(pow(q,3)-N)/(3*pow(q,2));
    }
    printf("%.6f\n",q);
  }
}

C++: #include <cstdio>
#include <cstdlib>
double abs(double t){
	if(t<0.0){
		return -1.0*t;
	}else{
		return t;
	}
}
int main(){
	double r;
	while(scanf("%lf",&r) && r!=-1.0){
		double e=r/2.0;
		for(;;){
			e=(e-(e*e*e-r)/(3*e*e));
			if(abs((double)e*e*e-(double)r)<0.00001*r){
				printf("%f\n",e);
				break;
			}
		}
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
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(alterX*alterX*alterX - q > eps) { //|x^3 - q| <= epsの時終了
        alterX = formula();
    }
}
//出力
void output(double ans) {
    printf("%.6f\n", ans);
}

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

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

using namespace std;
#define loop(i,a,b) for(int i=a; i<b; i++)
#define rep(i,b) loop(i,0,b)

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