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