#include <iostream>

using namespace std;

int main(){
    double s = 1, a = 3;

    for (int i = 1; i < 9; i++){
        s = s + (1 / a);
        a = a * 3;
    }

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

    return 0;
}