#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
const int mod = 1e6 + 3;
map<char, int> F;
int main() {
  F['>'] = 8;
  F['<'] = 9;
  F['+'] = 10;
  F['-'] = 11;
  F['.'] = 12;
  F[','] = 13;
  F['['] = 14;
  F[']'] = 15;
  string s;
  cin >> s;
  int res = 0;
  for (int i = 0; i < s.size(); i++) {
    res = (res * 16 + F[s[i]]) % mod;
  }
  cout << res << '\n';
  return 0;
}
