#include <bits/stdc++.h>
using namespace std;
int mod = 1000003;
int main() {
  string s;
  cin >> s;
  map<char, int> m;
  m['>'] = 8;
  m['<'] = 9;
  m['+'] = 10;
  m['-'] = 11;
  m['.'] = 12;
  m[','] = 13;
  m['['] = 14;
  m[']'] = 15;
  long long ans = 0;
  for (int i = 0; i < s.length(); i++) {
    ans = 16 * ans;
    ans = ans + m[s[i]];
    ans = ans % mod;
  }
  cout << ans;
  return 0;
}
