#include <bits/stdc++.h>
char st[300][100], sy[10000], ss[1000000];
int main() {
  long a, i, j, len, po, k;
  strcpy(st['>'], "1000");
  strcpy(st['<'], "1001");
  strcpy(st['+'], "1010");
  strcpy(st['-'], "1011");
  strcpy(st['.'], "1100");
  strcpy(st[','], "1101");
  strcpy(st['['], "1110");
  strcpy(st[']'], "1111");
  while (gets(sy)) {
    ss[0] = 0;
    len = strlen(sy);
    for (i = 0; i < len; i++) {
      strcat(ss, st[sy[i]]);
    }
    j = a = 0;
    len = strlen(ss);
    for (i = len - 1; i >= 0; i--) {
      po = 1;
      for (k = 0; k < j; k++) {
        po = po * 2;
        po = po % 1000003;
      }
      a += (ss[i] - 48) * po;
      j++;
      a = a % 1000003;
    }
    printf("%ld\n", a);
  }
  return 0;
}
