#include <bits/stdc++.h>
using namespace std;
int dig[10000011];
int tran[256];
const int MOD = 1000003;
int main(int argc, char *argv[]) {
  string s;
  tran['>'] = 1000;
  tran['<'] = 1001;
  tran['+'] = 1010;
  tran['-'] = 1011;
  tran['.'] = 1100;
  tran[','] = 1101;
  tran['['] = 1110;
  tran[']'] = 1111;
  while (cin >> s) {
    int n = s.size();
    int go = 0;
    for (int i = n - 1; i >= 0; i--) {
      int num = tran[s[i]];
      while (num > 0) {
        dig[go++] = num % 10;
        num /= 10;
      }
    }
    int res = 0;
    int tem = 1;
    for (int i = 0; i < go; i++) {
      tem %= MOD;
      res += dig[i] * tem;
      res %= MOD;
      tem *= 2;
    }
    cout << res << endl;
  }
  return 0;
}
