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