#include <iostream>
#include <iomanip>
#include <cmath>
#include <math.h>
using namespace std;
int fact(int n)
{
if (n == 0 || n == 1) return 1;
return fact(n - 1);
}
int main()
{
int n, x;
double r, memb;
n = 0;
r = 0;
x = 4;
memb = (pow(-1, n)) * (pow(x, 2 * n)) / fact(2 * n);
do
{
r += memb;
memb = (pow(-1, n)) * (pow(x, 2 * n)) / fact(2 * n);
n++;
} while (fabs(memb) >= 0.0001);
cout << r << endl;
system("pause");
}