#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, x;
  map<char, string> m;
  unsigned long long x1 = 0, c = 1, n;
  m['>'] = "1000";
  m['<'] = "1001";
  m['+'] = "1010";
  m['-'] = "1011";
  m['.'] = "1100";
  m[','] = "1101";
  m['['] = "1110";
  m[']'] = "1111";
  cin >> s;
  for (int i = 0; i < s.size(); i++) x += m[s[i]];
  for (int i = x.size() - 1; i >= 0; i--, c *= 2) {
    if (x[i] == '1') {
      x1 += c;
      c %= 1000003;
      x1 %= 1000003;
    }
  }
  cout << x1 << endl;
  return 0;
}
