#include <bits/stdc++.h>
using namespace std;
int main() {
  map<char, int> m;
  m['>'] = 8;
  m['<'] = 9;
  m['+'] = 10;
  m['-'] = 11;
  m['.'] = 12;
  m[','] = 13;
  m['['] = 14;
  m[']'] = 15;
  string s;
  long long prod = 1, out = 0;
  cin >> s;
  for (int i = s.size() - 1; i >= 0; i--) {
    out += (m[s[i]] * (prod % 1000003)) % 1000003;
    prod *= 16;
    prod = prod % 1000003;
  }
  cout << out % 1000003 << endl;
}
