#include <bits/stdc++.h>
using namespace std;
inline int pwr(int x, int y) {
  int res = 1;
  for (int i = 0; i < y; i++) res *= x;
  return res;
}
int main() {
  map<char, string> m;
  m['>'] = "1000";
  m['<'] = "1001";
  m['+'] = "1010";
  m['-'] = "1011";
  m['.'] = "1100";
  m[','] = "1101";
  m['['] = "1110";
  m[']'] = "1111";
  string s, x;
  cin >> s;
  int r = 0;
  for (int i = 0; i < s.size(); i++) {
    x = m[s[i]];
    for (int j = 0; j < 4; j++) {
      r = r * 2 + (x[j] - '0');
      r %= 1000003;
    }
  }
  cout << r;
  return 0;
}
