#include <bits/stdc++.h>
using namespace std;
map<char, string> mappy;
string Reversed(string s) {
  string r;
  for (int i = s.length() - 1; i >= 0; i--) r += s[i];
  return r;
}
long long pwr(long long a, long long b, long long mod) {
  a %= mod;
  if (a < 0) a += mod;
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % mod;
    a = (a * a) % mod;
    b /= 2;
  }
  return ans;
}
int main() {
  string s;
  cin >> s;
  mappy['>'] = "1000";
  mappy['<'] = "1001";
  mappy['+'] = "1010";
  mappy['-'] = "1011";
  mappy['.'] = "1100";
  mappy[','] = "1101";
  mappy['['] = "1110";
  mappy[']'] = "1111";
  string Bin;
  for (int i = 0; i < s.length(); i++) Bin += mappy[s[i]];
  unsigned long long answer = 0;
  string Work = Reversed(Bin);
  for (int i = 0; i < Work.size(); i++) {
    if (Work[i] == '1') {
      answer += pwr(2, i, 1000003);
    }
  }
  answer = answer % 1000003;
  cout << answer;
  return 0;
}
