#include <bits/stdc++.h>
using namespace std;
string itos(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
int stoi(string s) {
  stringstream ss;
  ss << s;
  int n;
  ss >> n;
  return n;
}
string bin(long l) {
  string s = "";
  while (l > 0) {
    s += char((l % 2) + 48);
    l /= 2;
  }
  reverse(s.begin(), s.end());
  return s;
}
int pow2(int n) {
  int ret = 1;
  if (n == 0) {
    return 1;
  }
  for (int i = 0; i < n; i++) {
    ret = ret * 2;
    ret = ret % 1000003;
  }
  return ret;
}
int main() {
  string s;
  cin >> s;
  string ss = "";
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '>') ss += "1000";
    if (s[i] == '<') ss += "1001";
    if (s[i] == '+') ss += "1010";
    if (s[i] == '-') ss += "1011";
    if (s[i] == '.') ss += "1100";
    if (s[i] == ',') ss += "1101";
    if (s[i] == '[') ss += "1110";
    if (s[i] == ']') ss += "1111";
  }
  reverse(ss.begin(), ss.end());
  int ret = 0;
  for (int i = 0; i < ss.size(); i++) {
    if (ss[i] == '1') ret += pow2(i);
    ret = ret % 1000003;
  }
  cout << ret;
}
