#include <bits/stdc++.h>
using namespace std;
const long long mod = (long long)1e6 + 3;
unsigned long long ans = 0;
unsigned long long q = 1;
int main() {
  string qwe;
  cin >> qwe;
  string s = "";
  for (int i = 0; i < qwe.size(); i++) {
    char c = qwe[i];
    if (c == '>') {
      s += "1000";
    }
    if (c == '<') {
      s += "1001";
    }
    if (c == '+') {
      s += "1010";
    }
    if (c == '-') {
      s += "1011";
    }
    if (c == '.') {
      s += "1100";
    }
    if (c == ',') {
      s += "1101";
    }
    if (c == '[') {
      s += "1110";
    }
    if (c == ']') {
      s += "1111";
    }
  }
  reverse(s.begin(), s.end());
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '1') {
      ans = (ans + q);
      ans %= mod;
    }
    q *= 2;
    q %= mod;
  }
  cout << ans % mod;
  return 0;
}
