func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2;   const int MO = 1e9 + 7;   const int K = 5e8 + 4;   struct Matrix {     int a[N][N];     Matrix(bool ident = 0) {       for (int i = int(0); i <= int((N)-1); i++)         for (int j = int(0); j <= int((N)-1); j++) a[i][j] = 0;       if (ident) {         for (int i = int(0); i <= int((N)-1); i++) a[i][i] = 1;       }     }     int *operator[](int i) { return a[i]; }     const int *operator[](int i) const { return a[i]; }   };   void add(int &x, int y) {     x += y;     if (x >= MO) x -= MO;   }   Matrix operator*(const Matrix &a, const Matrix &b) {     Matrix c;     for (int i = int(0); i <= int((N)-1); i++)       for (int j = int(0); j <= int((N)-1); j++)         for (int k = int(0); k <= int((N)-1); k++) {           add(c[i][j], 1LL * a[i][k] * b[k][j] % MO);         }     return c;   }   Matrix powd(Matrix a, long long b) {     Matrix ans(1);     while (b) {       if (b & 1) ans = ans * a;       a = a * a;       b >>= 1;     }     return ans;   }   int powd(int a, long long b) {     int ans = 1;     while (b) {       if (b & 1) ans = 1LL * ans * a % MO;       b >>= 1;       a = 1LL * a * a % MO;     }     return ans;   }   int main() {     Matrix magic;     magic[0][0] = magic[1][0] = 1, magic[0][1] = 2;     int n;     cin >> n;     Matrix now = magic;     int down = 2;     for (int i = int(0); i <= int((n)-1); i++) {       long long x;       scanf( %I64d , &x);       now = powd(now, x);       down = powd(down, x);     }     cout << 1LL * now[1][1] * K % MO <<  /  << 1LL * down * K % MO << endl;     return 0;   }   