#include <bits/stdc++.h>
using namespace std;
int pow(int x) {
  int ans = 1;
  for (int i = 0; i < x; i++) ans = (ans * 2) % 1000003;
  return ans;
}
int main() {
  string s, s1;
  cin >> s;
  long long i, ans = 0;
  for (i = 0; i < s.length(); i++) {
    if (s[i] == '>') {
      s1 += "1000";
    }
    if (s[i] == '<') {
      s1 += "1001";
    }
    if (s[i] == '+') {
      s1 += "1010";
    }
    if (s[i] == '-') {
      s1 += "1011";
    }
    if (s[i] == '.') {
      s1 += "1100";
    }
    if (s[i] == ',') {
      s1 += "1101";
    }
    if (s[i] == '[') {
      s1 += "1110";
    }
    if (s[i] == ']') {
      s1 += "1111";
    }
  }
  for (i = 0; i < s1.length(); i++)
    if (s1[i] == '1') ans = (ans + pow(s1.length() - i - 1)) % 1000003;
  cout << ans;
  return 0;
}
