#include <iostream>
#include <fstream>
using namespace std;
int main()
{
	ifstream f1("sotnn.inp");
	int n;
	f1>>n;
	f1.close();
	int sc,sl,s;
	sc=sl=s=0;
	int demc,deml,dem;
	demc=deml=dem=0;
	if(n>1){
	for(int i=1;i<n;i++)
	{
		 if(i%2==0){sc+=i;
		 demc++;
		 }
		 else {sl+=i;
		 deml++;
		 } 
	}
	s=sc+sl;
	dem=demc+deml;
	ofstream f2("sotnn.out");
	f2.setf(ios::fixed);
	f2.setf(ios::showpoint);
	f2.precision(2);
	f2<<sc<<" "<<float(sc)/float(demc)<<endl;
	f2<<sl<<" "<<float(sl)/float(deml)<<endl;
	f2<<s<<" "<<float(s)/float(dem)<<endl;
	f2.close();}
	if(n<=1)
	{
		ofstream f2("sotnn.out");
		f2<<0<<" "<<"0.00"<<endl<<0<<" "<<"0.00"<<endl<<0<<" "<<"0.00";
		f2.close();
	}
}
