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 <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const LL LL_INF = 1ll << 60;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };

#ifdef WIN32
#define dump(x) cout << #x << " = " << (x) << "\n"
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n"
#else
#define dump(x)
#define debug(x)
#endif

int n;

void solve() {
	printf( "%f\n", pow<double>(n, 1.0 / 3) );
}

int main() {
#ifdef WIN32
	printf( "Debug Mode\n" );
#endif
	while ( ~scanf( "%d", &n ) && ~n ) {
		solve();
	}
	return 0;
}

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

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);

#define CLR(a) memset((a), 0 ,sizeof(a))

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};

int main() {
  int q;

  while(cin >> q, q != -1) {
    double x = q/2;
    while(true) {
      if(abs(x*x*x-q) < 0.00001*q) break;
      x = x - ((x*x*x-q)/(3*x*x));
    }
    printf("%lf\n", x);
  }  
}

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

using namespace std;

long double make(long double in){
  int i = (int)in;
  int k = 0;
  while(i){
    k++;
    i/=10;
  }
  for(int i = 0; i < 5+k; i++) in/=10;
  return 0.00001+in;
}

int main(){

  long double in;
  while(cin >> in){
    if(in == -1) break;
    long double x = in/2;
    long double judge = make(in);
    while(1){
      if(fabs(x*x*x - in) < judge){
	printf("%.6Lf\n",x);
	break;
      }
      x = (2*x/3 +in/(3*x*x));
    }
  }
  return 0;
}

C++: #include <iostream>
#include <cmath>
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++: #include <iostream>
#include <cmath>
#include <cstdio>
#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++: #include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>

typedef long long int ll;


using namespace std;

int q;
double x;

double f(){
	return x*x*x-q;
}
double df(){
	return 2*x*x;
}

double calc(){
	x=(double)q/2;
	while(1){
		if((fabs(f())>-0.00001*q&&fabs(f())<0.00001*q)){
			break;
		}
		x=(x*df()-f())/df();
	}
	return x;
}

int main(){
	while(1){
		cin>>q;
		if(q==-1)break;
		printf("%.15lf\n", calc());
	}
}

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

using namespace std;

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<complex>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()

using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

#define MAX 1010

int main(){
  int q;
  while(cin>>q, q+1){
    double x = q / 2.0;
    while( abs(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 <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-5
#define F first
#define S second

static const double PI=6*asin(0.5);
typedef pair<double,double> P;
typedef complex<double> CP;
typedef long long ll;

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

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

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  int q;
  while(cin>>q, q!=-1) {
    double x = 0.5 * q;
    while(abs(x*x*x-q) >= 0.00001 * q) {
      x = x - (x*x*x-q)/(3*x*x);
    }
    printf("%.6lf\n",x);
  }
}

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

int main(void){
	double q;

	while(scanf("%lf", &q)){
		if(q == -1) break;
		double x = 0;
		x = q/2.0;
		while(std::abs(x*x*x - q) >= 0.00001*q){
			x = x - (x*x*x - q) / (3*x*x);
		}
		printf("%.6f\n", x);
	}


	return 0;
}