#include <bits/stdc++.h>
using namespace std;
int main() {
  stringstream ss;
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    switch (s[i]) {
      case '>':
        ss << 1000;
        break;
      case '<':
        ss << 1001;
        break;
      case '+':
        ss << 1010;
        break;
      case '-':
        ss << 1011;
        break;
      case '.':
        ss << 1100;
        break;
      case ',':
        ss << 1101;
        break;
      case '[':
        ss << 1110;
        break;
      case ']':
        ss << 1111;
        break;
      default:
        break;
    }
  }
  string ans = ss.str();
  int os = 1;
  long long jawab = 0;
  for (int i = ans.length() - 1; i >= 0; i--) {
    if (ans[i] == '1') jawab = (jawab + os) % 1000003;
    os = (os * 2) % 1000003;
  }
  cout << jawab << endl;
  return 0;
}
