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