#include <bits/stdc++.h>
using namespace std;
const int N = 1e7 + 5;
map<char, int> f;
char s[N];
int main() {
  gets(s);
  f['>'] = 8;
  f['<'] = 9;
  f['+'] = 10;
  f['-'] = 11;
  f['.'] = 12;
  f[','] = 13;
  f['['] = 14;
  f[']'] = 15;
  int l, i, sum = 0;
  l = strlen(s);
  for (i = 0; i < l; i++) sum = ((sum * 16) % 1000003 + f[s[i]]) % 1000003;
  cout << sum << endl;
  return 0;
}
