#include <iostream>
using namespace std;
int fibonacci(int n)
{
if (n == 0)
return 0;
else if (n == 1)
return 1;
else
return fibonacci(n - 1) + fibonacci(n - 2);
}
int main()
{
int x{}, N{};
double S{};
cout << "Input x and N: " << endl;
cin >> x >> N;
for (int i{ 1 }; i <= N; i++)
{
S += ((fibonacci(i)) / (x + fibonacci(i + 1)));
}
cout << "S = " << S << endl;
return 0;
}