#include <bits/stdc++.h>
using namespace std;
long long int BASE = 1000003;
map<char, string> m;
void store() {
  m['>'] = "1000";
  m['<'] = "1001";
  m['+'] = "1010";
  m['-'] = "1011";
  m['.'] = "1100";
  m[','] = "1101";
  m['['] = "1110";
  m[']'] = "1111";
}
int main() {
  store();
  char a[1000];
  scanf("%s", a);
  int l = strlen(a);
  string s;
  for (int i = 0; i < l; ++i) {
    s += m[a[i]];
  }
  l = s.length();
  long long int val = 0;
  for (int i = 0; i < l; ++i) {
    val = (val * 2 + (s[i] == '0' ? 0 : 1)) % BASE;
  }
  cout << val << endl;
  return 0;
}
