#include <iostream>
#include <cmath>

using namespace std;

int main(){
    double x = 2;
    double s = 1;
    double func;

    for (int i = 1; i <= 10; i++){
        func = (i + 1) / ((i + 2) * pow(x, i));
        s = s + (pow(-1, i) * func);
    }

    cout << "Function result: " << s << endl;    

    return 0;
}