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