#include<iostream>
#include<conio.h>
using namespace std;
class Seri_1ByNClass
{
	private :
		double Sum, a;
		int i;
	public :
		int n;
		Seri_1ByNClass()
		{
			Sum = 0;
			a = 1;
		}
		void Calculate()
		{
			for(i = 2; i <= n; i++, a = -a)
				Sum += a / i;
		}
		double GetSum()
		{
			return Sum;
		}
};

int main()
{
	Seri_1ByNClass A;
	cout << "adade vorudi n ra vared konid : ";
	cin >> A.n;
	if (A.n >= 2)
	{
		A.Calculate();
		cout << "Natije = " << A.GetSum() << endl;
	}
	else
		cout << "vorodi ghalat ast!";
	getch();
}

