#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 0;
  char d[500];
  string s;
  d['>'] = 8, d['<'] = 9, d['+'] = 10, d['-'] = 11, d['.'] = 12, d[','] = 13,
  d['['] = 14, d[']'] = 15;
  cin >> s;
  int sz = s.size();
  for (int i = 0; i < sz; i++) ans = (ans * 16 + d[s[i]]) % 1000003;
  printf("%d\n", ans);
}
