#include<fstream>
#include<iostream>
using namespace std;
int main ()
{
	int n;
	ifstream f1; f1.open("sotnn.inp");
	f1>>n;
	f1.close();
	int b,sl,sc,ssl,ssc;
	sl=0;sc=0;ssc=0;ssl=0;
	if(n>1) {
	for(b=1;b<n;b++) 
	{
		if(b%2==0) {sc++;ssc=ssc+b;}
		if(b%2!=0) {sl++;ssl=ssl+b;}
		
	}
	cout<<"TBC cac so le: "<<ssl/sl<<endl<<"Tong cac so le: "<<ssl<<endl<<"TBC cac so chan: "<<ssc/sc<<endl<<"Tong cac so chan: "<<ssc<<endl<<"TBC tat ca: "<<(ssc+ssl)/(sc+sl)<<endl<<"Tong tat ca"<<ssc+ssl;
	ofstream f2; f2.open("sotnn.out");
	f2.setf(ios::fixed);
	f2.setf(ios::showpoint);
	f2.precision(2);
	f2<<ssc<<" "<<float(ssc)/float(sc)<<endl<<ssl<<" "<<float(ssl)/float(sl)<<endl<<ssc+ssl<<" "<<(float(ssl)+float(ssc))/(float(sc)+float(sl));
	f2.close();}
	if(n<=1) {	ofstream f2; f2.open("sotnn.out"); f2<<0<<" "<<"0.00"<<endl<<0<<" "<<"0.00"<<endl<<0<<" "<<"0.00";
	f2.close();
	}
}
