#include <bits/stdc++.h>
using namespace std;
map<char, string> m;
string input;
string ans;
int main() {
  ios_base::sync_with_stdio(0);
  m['>'] = "1000";
  m['<'] = "1001";
  m['+'] = "1010";
  m['-'] = "1011";
  m['.'] = "1100";
  m[','] = "1101";
  m['['] = "1110";
  m[']'] = "1111";
  cin >> input;
  ans = "";
  for (int i = 0; i < input.size(); ++i) ans += m[input[i]];
  int ans_num = 0;
  int power = 1;
  for (int i = ans.size() - 1; i >= 0; --i) {
    if (ans[i] == '1') {
      ans_num += power;
      ans_num %= ((int)(1e6) + 3);
    }
    power *= 2;
    power %= ((int)(1e6) + 3);
  }
  cout << ans_num << "\n";
  return 0;
}
