#include <bits/stdc++.h>
using namespace std;
long long power(long long kk) {
  long long ans = 1;
  for (int i = 0; i < kk; i++) {
    ans *= 2;
    ans %= 1000003;
  }
  return ans;
}
int main() {
  string ch, bin;
  getline(cin, ch);
  for (int i = 0; i < ch.size(); i++) {
    if (ch[i] == '>')
      bin += "1000";
    else if (ch[i] == '<')
      bin += "1001";
    else if (ch[i] == '+')
      bin += "1010";
    else if (ch[i] == '-')
      bin += "1011";
    else if (ch[i] == '.')
      bin += "1100";
    else if (ch[i] == ',')
      bin += "1101";
    else if (ch[i] == '[')
      bin += "1110";
    else if (ch[i] == ']')
      bin += "1111";
  }
  long long n = 0, dec = 0, whatever = 0;
  for (int i = bin.size() - 1; i >= 0; i--) {
    if (bin[i] == '1') {
      n = n + power(whatever);
    }
    whatever++;
  }
  cout << n % 1000003;
  return 0;
}
