#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int mod = 1e6 + 3;
string mm(char c) {
  if (c == '>') return "1000";
  if (c == '<') return "1001";
  if (c == '+') return "1010";
  if (c == '-') return "1011";
  if (c == '.') return "1100";
  if (c == ',') return "1101";
  if (c == '[') return "1110";
  if (c == ']') return "1111";
}
long long pow2(long long a, long long b, long long c = 0) {
  c = mod;
  long long res = 1;
  a %= c;
  while (b) {
    if (b & 1) res = (res * a) % c;
    a = (a * a) % c;
    b >>= 1;
  }
  return res;
}
int main() {
  string tmp;
  cin >> tmp;
  string ans = "";
  for (auto &i : tmp) {
    ans += mm(i);
  }
  int sz = ans.length();
  int cnt = 0;
  long long res = 0;
  for (int i = sz - 1; i >= 0; i--) {
    if (ans[i] == '1') {
      res += pow2(2, cnt);
      res %= mod;
    }
    cnt++;
  }
  cout << res << endl;
  return 0;
}
