#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, result = "";
  long l, i, lr, val = 0, j, temp, k;
  map<char, string> ref;
  map<char, string>::iterator itr;
  ref['>'] = "1000";
  ref['<'] = "1001";
  ref['+'] = "1010";
  ref['-'] = "1011";
  ref['.'] = "1100";
  ref[','] = "1101";
  ref['['] = "1110";
  ref[']'] = "1111";
  cin >> s;
  l = s.length();
  for (i = 0; i < l; i++) result += ref[s[i]];
  lr = result.length();
  for (i = lr - 1, j = 0; i >= 0; i--, j++)
    if (result[i] == '1') {
      temp = 1;
      for (k = 0; k < j; k++) temp = (temp * 2) % 1000003;
      val = (val + temp) % 1000003;
    }
  cout << val;
  return 0;
}
