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