#include <bits/stdc++.h>
const char* CHR = "><+-.,[]";
int find(char x) {
  int i;
  for (i = 0; i < 8; i++) {
    if (CHR[i] == x) return i + 8;
  }
  return -1;
}
int main() {
  int ans = 0;
  char c;
  while (scanf("%c", &c) && c != '\n') ans = (16 * ans + find(c)) % 1000003;
  printf("%d\n", ans);
  return 0;
}
