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

typedef long long ll;

int main(){
  cout<<fixed<<setprecision(12);
  ll n;
  while(cin>>n && n){
  vector<vector<double>> dp(1000,vector<double>(1000,0));
  double ans=0;
  dp[n/2][0]=1;
  for(ll i=n/2;i>0;i--){
    for(ll t=0;t<=i;t++){
      double k=dp[i][t];
      if(k==0){continue;}
      ll A=i*2-t;
      k*=t;
      k/=A;
      dp[i-1][t-1]+=k;
      k=dp[i][t]-k;
      if(k==0){continue;}
      A--;
      dp[i-1][t]+=k/A;
      k-=k/A;
      if(k==0){continue;}
      double d;
      d=k*(i*2-t*2-2)/(i*2-t-2);
      ans+=d;
      dp[i][t+2]+=d;
      d=k*t/(i*2-t-2);
      ans+=d;
      dp[i-1][t]+=d;
    }
  }
  cout<<ans<<endl;
  }




  return 0;
}

