#include <bits/stdc++.h>
using namespace std;
map<char, string> code;
void init() {
  code['>'] = "1000";
  code['<'] = "1001";
  code['+'] = "1010";
  code['-'] = "1011";
  code['.'] = "1100";
  code[','] = "1101";
  code['['] = "1110";
  code[']'] = "1111";
}
int main() {
  init();
  string s;
  cin >> s;
  reverse(s.begin(), s.end());
  int n = s.size();
  long long ans = 0;
  long long pot = 1;
  for (int i = 0; i < n; i++) {
    string x = code[s[i]];
    for (int j = 0; j < x.size(); j++) {
      int id = i * 4 + j;
      if (id) pot = (pot * 2) % 1000003;
      if (x[3 - j] == '1') ans = (ans + pot) % 1000003;
    }
  }
  cout << ans << endl;
  return 0;
}
