#include <bits/stdc++.h>
using namespace std;
long long power(long long b, long long p) {
  long long ret = 1;
  for (int i = 1; i <= p; i++) {
    ret *= b;
    ret %= 1000003;
  }
  return ret;
}
int main() {
  char a[100 + 10];
  gets(a);
  string str = "";
  for (int i = 0; a[i]; i++) {
    switch (a[i]) {
      case '>':
        str += "1000";
        break;
      case '<':
        str += "1001";
        break;
      case '+':
        str += "1010";
        break;
      case '-':
        str += "1011";
        break;
      case '.':
        str += "1100";
        break;
      case ',':
        str += "1101";
        break;
      case '[':
        str += "1110";
        break;
      case ']':
        str += "1111";
        break;
      default:
        break;
    }
  }
  reverse(str.begin(), str.end());
  long long res = 0;
  for (int i = 0; i < str.size(); i++) {
    res += power(2, i) * (str[i] - '0');
    res %= 1000003;
  }
  cout << res % 1000003 << endl;
  return 0;
}
