#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000003;
const int maxn = 1e+5;
string s, s2;
int main(int argc, const char* argv[]) {
  cin >> s;
  s2 = "";
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '>')
      s2 += "1000";
    else if (s[i] == '<')
      s2 += "1001";
    else if (s[i] == '+')
      s2 += "1010";
    else if (s[i] == '-')
      s2 += "1011";
    else if (s[i] == '.')
      s2 += "1100";
    else if (s[i] == ',')
      s2 += "1101";
    else if (s[i] == '[')
      s2 += "1110";
    else if (s[i] == ']')
      s2 += "1111";
  }
  long long ans = 0, fact = 1;
  for (long long i = (s2.size() - 1); i >= 0; i--) {
    if (s2[i] == '1') {
      ans += fact;
      ans %= MOD;
    }
    fact *= 2;
    fact %= MOD;
    if (ans < 0) ans += MOD;
    if (fact < 0) fact += MOD;
  }
  cout << ans;
  return 0;
}
