#include<stdio.h>
int main()
{
	int x, i;
	double m1=1;
	double m2=5;
	double m3;
	printf("Meghdare Vorodi = ");
	scanf("%d", &x);
	printf("Natije = ");
	switch(x)
	{
		case 1 :
			printf("1\n");
			break;
		case 2 :
			printf("5\n");
			break;
		default :
			{
				for(i = 2; i < x; i++)
				{
					m3 = (m1 + m2) / 2;
					m1 = m2;
					m2 = m3;
				}
				printf("%g\n", m3);				
			}
			break;
	}
	getch();
}

