#include<fstream>
#include<math.h>
#include<iostream>
using namespace std;
int main ()
{
long int n,sa=0,sb=0,sc=0,sd,sd1=1,sd2=1,i;
ifstream f1; f1.open("tinh.inp");
f1>>n;
f1.close();
//a. S=1 + 3 + 5 + 7 + 9 +...+ (2n+1);
for (i=1;i<=2*n+1;i=i+2) {sa=sa+i;}
//S=n!
for (i=1;i<=n;i=i+1) {sb=sb*i;}
//S=1/(2*3)+...+1/(n^2+n);
for(i=2;i<=n;i++)
	{
	sc=sc+(1/(float(i)*(float(i)+1)));
	}
//S(1)=1; S(2)=1; S(n+2) = S(n)+S(n+1)
for(i=1;i<=n;i++) 
	{
	sd=sd1+sd2;
	sd1=sd2;
	sd2=sd;
	}
ofstream f2;f2.open("tinh.out");
f2.setf(ios::fixed);
f2.setf(ios::showpoint);
f2.precision(2);
f2<<sa<<endl<<sb<<endl<<sc<<endl<<sd;
f2.close();
}
