func_code_string: #include <bits/stdc++.h>   using namespace std;   int m = 1000000 + 3;   int db[1010];   int twospows[1010];   long long mpow(int b, int e) {     if (e == 0) return 1;     if (e == 1) return b;     return (mpow(b, e / 2) % m) * (mpow(b, e - e / 2) % m) % m;   }   long long twopow(int e) {     if (twospows[e] != -1) return twospows[e];     return twospows[e] = mpow(2, e);   }   long long solve(int n) {     if (n == 0) return 1;     if (db[n] != -1) return db[n];     long long v = twopow(n - 1);     for (int i = n - 1; i != 0; --i) {       v += twopow(n - i - 1) * solve(i);       v %= m;     }     return db[n] = v % m;   }   int main() {     int n;     cin >> n;     fill(db, db + 1010, -1);     fill(twospows, twospows + 1010, -1);     cout << solve(n) << endl;     return 0;   }   