#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int k, sum = 0;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '>') k = 8;
    if (s[i] == '<') k = 9;
    if (s[i] == '+') k = 10;
    if (s[i] == '-') k = 11;
    if (s[i] == '.') k = 12;
    if (s[i] == ',') k = 13;
    if (s[i] == '[') k = 14;
    if (s[i] == ']') k = 15;
    if (i == 0)
      sum = k;
    else {
      sum = sum * 16 + k;
      sum = sum % (1000000 + 3);
    }
  }
  cout << sum;
  return 0;
}
