#include <bits/stdc++.h>
using namespace std;
unsigned long long fastpower(int x, int y) {
  if (y == 0) return 1;
  if (y % 2 == 0)
    return fastpower(x, y / 2) % 1000003 * fastpower(x, y / 2) % 1000003;
  else
    return x % 1000003 * fastpower(x, y / 2) % 1000003 * fastpower(x, y / 2) %
           1000003;
}
int main() {
  map<char, string> alg;
  alg['>'] = "1000";
  alg['<'] = "1001";
  alg['+'] = "1010";
  alg['-'] = "1011";
  alg['.'] = "1100";
  alg[','] = "1101";
  alg['['] = "1110";
  alg[']'] = "1111";
  string s, binary, temp;
  cin >> s;
  long long ans = 0, bit = 0;
  for (int i = 0; i < s.size(); i++) binary += alg[s[i]];
  for (int i = binary.size() - 1; i >= 0; i--) {
    if (binary[i] == '1') ans = ans % 1000003 + fastpower(2, bit) % 1000003;
    bit++;
  }
  cout << ans % 1000003 << endl;
  return 0;
}
