#include <bits/stdc++.h>
void judge(char ch, char *str) {
  memset(str, 0, sizeof(str));
  if (ch == '>')
    strcpy(str, "1000");
  else if (ch == '<')
    strcpy(str, "1001");
  else if (ch == '+')
    strcpy(str, "1010");
  else if (ch == '-')
    strcpy(str, "1011");
  else if (ch == '.')
    strcpy(str, "1100");
  else if (ch == ',')
    strcpy(str, "1101");
  else if (ch == '[')
    strcpy(str, "1110");
  else if (ch == ']')
    strcpy(str, "1111");
}
int main() {
  char str[5], ch;
  int sum = 0;
  while ((ch = getchar()) != EOF) {
    if (ch == '\n') {
      printf("%d\n", sum);
      sum = 0;
      continue;
    }
    judge(ch, str);
    for (int i = 0; i < 4; i++)
      sum = (sum * 2 % 1000003 + str[i] - '0') % 1000003;
  }
  return 0;
}
