#include <bits/stdc++.h>
using namespace std;
const long double PI =
    3.141592653589793238462643383279502884197169399375105820974944592307816;
long long fast_pow(int a, int n) {
  long long result = 1, power = n, value = a;
  while (power > 0) {
    if (power & 1) result = (result * value) % 1000003;
    value = (value * value) % 1000003;
    power = power >> 1;
  }
  return result;
}
int main() {
  map<int, string> m;
  m['>'] = "1000";
  m['<'] = "1001";
  m['+'] = "1010";
  m['-'] = "1011";
  m['.'] = "1100";
  m[','] = "1101";
  m['['] = "1110";
  m[']'] = "1111";
  string s;
  string f;
  getline(cin, f);
  long long ans = 0;
  for (int i = 0; i < f.length(); ++i) {
    s += m[f[i]];
  }
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '1') {
      ans += fast_pow(2, s.length() - i - 1);
      ans %= 1000003;
    }
  }
  cout << ans;
}
