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 <iomanip>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>

using namespace std;

int main() {
	while (1) {
		double q;
		cin >> q;
		if (q == -1)
			break;
		double x = q / 2;
		while (fabs(pow(x, 3) - q) >= 0.00001 * q) {
			x = x - (pow(x, 3) - q) / (3 * pow(x, 2));
		}
		cout << fixed << setprecision(6) << x << endl;
	}
	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 <cfloat>
#include <iomanip>
using namespace std;
double f(double x, double q){
    return pow(x, 3.0) - q;
}

double df(double x){
    return 3.0 * pow(x, 2.0);
}

double newton(double x, double q){
    if(abs(f(x, q)) < 0.00001 * q){
        return x; 
    }
    return newton(x - f(x, q) / df(x), q);
}

int main(void){
    double q, x;
    while(cin >> q){
        if(q == -1) break;
        x = q / 2.0;
        cout << fixed << setprecision(6) << newton(x, q) << endl;
    }
    return 0;
}

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

int main()
{
  int q;
  
  while (scanf("%d", &q), q != -1){
    double x = q / 2.0;
    while (!(fabs(x * x * x - q) < q * 1e-5)){
      x = x - (x * x * x - q) / (3.0 * x * x);
    }
    printf("%f\n", x);
  }

  return (0);
}

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

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

C++: #include<bits//stdc++.h>
using namespace std;
int main(){
	int a;
	while(true){
		cin>>a;
		if(a==-1) {break;}
		double x1=a/2,x2;
		int i=1;
		while(true){
			if(i%2==1){
				x2=x1-(x1*x1*x1-a)/(3*x1*x1);
				if(abs(x2*x2*x2-a)<0.00001*a) 
				{
					cout<<x2<<endl;
					break;
				}
			}
			else{
				x1=x2-(x2*x2*x2-a)/(3*x2*x2);
				if(abs(x1*x1*x1-a)<0.00001*a) 
				{
					cout<<x1<<endl;
					break;
				}
			}
			i++;
		}

	}
	return 0;
}

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

using namespace std;

int main()
{
    int q;
    
    while(true)
    {
        cin >> q;
        
        if(q == -1) { break; }
        
        cout << fixed << setprecision(17) << pow(q, 1.0 / 3.0) << endl;
    }
    
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <string>
#include <bitset>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <sstream>
#include <fstream>
//#include <tuple>
#include <set>
#include <string.h>
#include <functional>

#define X first
#define Y second
#define MP make_pair
//#define MT make_tuple
#define REP(i, a, n) for(int (i) = (a); (i) < (n); ++(i))
#define FOR(i, n) REP(i, 0, n)
typedef long long ll;
using namespace std;
const int MAX = 500;
const double eps = 0.0000001;

template<class T, class U>
void convert(T &t, U &u)
{
	stringstream ss;
	ss << t;
	ss >> u;
}

int main()
{
	ll q;
	while( cin >> q ){
		if( q == -1 ) break;
		double x = q / 2;
		while(  abs( x * x * x - q ) + eps >= 0.000010 * q ){
			x = x - (x * x * x - q) / ( 3 * x * x );
		}
		printf("%.06f\n", x);
	}
	return 0;
}

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

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

using std::cin;
using std::printf;

double third_root(double q,int n) {
	double x = q/2.0;
	for (int i = 0;i != n;++i) {
		x = x - (x*x*x - q)/(3*x*x);
	}
	return x;
}

int main() {
	int q;
	while (cin >> q && ~q) {
		printf("%lf\n",third_root((double)q,100000));
	}
}

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

using namespace std;

int main(){

  int in;
  while(cin >> in){
    if(in == -1) break;
    double x = (double)in/2;
    while(1){
      if(labs(x*x*x - (double)in) < 0.00001+0.000001*(double)in){
	x = (2*x/3 + (double)in/(3*x*x));
	printf("%.6f\n",2*x/3 + (double)in/(3*x*x));
	break;
      }
      x = (2*x/3 + (double)in/(3*x*x));
    }
  }
  return 0;
}

C++: #include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
double ZKS(double x,double q){
	return (x - ((x * x * x) - q) / (3 * x * x));
}

int main(void){
	double q;

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

		double x1 = q / 2;
		double x = x1;

		while(abs(x * x * x - q) > 0.00001 * q){
			x = ZKS(x,q);
		}

		cout << fixed;
		cout << setprecision(6) << x <<endl;
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
	double x,p;
	while(cin>>p,p!=-1){
		x=p/2;
		while(max(x*x*x-p,p-x*x*x)>=0.00001*p){
			x=x-(x*x*x-p)/(3*x*x);
		}
		printf("%.6lf\n",x);
	}
	return 0;
}

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

int main(){
	int q;
	while(cin>>q,q!=-1){
		double x=q/2.0;
		while(fabs(x*x*x-q)>=0.00001*q)x-=(x*x*x-q)/(3*x*x);
		printf("%.6f\n", x);
	} 
	return 0;
}

C++: //58
#include<iostream>
#include<cmath>

using namespace std;

int main(){
  for(double q;cin>>q,q!=-1;){
    double x=q/2;
    while(!(fabs(x*x*x-q)<0.00001*q)){
      x=x-(x*x*x-q)/3/x/x;
    }
    cout<<x<<endl;
  }
  return 0;
}

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

int main()
{
  int q;
  while (scanf("%d", &q) == 1 && q != -1) {
    double x = q/2.0;
    for (;;) {
      x = x - (x*x*x - q)/(3*x*x);
      if (fabs(x*x*x - q) < 1e-5*q) {
        break;
      }
    }
    printf("%.6f\n", x);
  }
  return 0;
}

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

int main()
{
  int q;
  while (scanf("%d", &q) == 1 && q != -1) {
    double x = q/2.0;
    for (;;) {
      const double x1 = x - (x*x*x - q)/(3*x*x);
      if (fabs(x1 - x) < 1e-5*q) {
        break;
      }
      x = x1;
    }
    printf("%.6f\n", x);
  }
  return 0;
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;
#define EPS 0.00001

//0080
int main(){
	// x^3=qを漸化式でとく
	// X(n+1) = X(n)-( X(n)^3 - q )/( 3*(X(n)^2) )

	int q;
	while(cin >> q, q!=-1){
		double x = (double)q/2.0;
		while(1){
			double c = (x*x*x-q);
			x = x-c/(3*x*x);
			
			if(fabs(c) < q*EPS){
				//printf ("%.6f\n", x);
				cout.setf(ios::fixed);
				cout.precision(6);
				cout << x << endl;
				break;
			}
		}
	}
	return 0;
}