#include <bits/stdc++.h>
using namespace std;
long long f[1005], t[1005], mod = 1000000 + 3;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    t[0] = 1;
    for (int i = 1; i <= 1000; i++) {
      t[i] = (2 * t[i - 1]) % mod;
    }
    memset(f, 0, sizeof(f));
    f[0] = 1;
    for (int i = 1; i <= n; i++) {
      f[i] = t[i - 1];
      int k = 0;
      for (int j = i - 1; j >= 1; j--, k++) {
        f[i] = (f[i] + (t[k] * f[j]) % mod) % mod;
      }
    }
    printf("%lld\n", f[n]);
  }
  return 0;
}
