#include <bits/stdc++.h>
using namespace std;
int main() {
  char p[120];
  while (gets(p)) {
    char a[450];
    a[0] = '\0';
    int t = 0;
    for (int i = 0; i < strlen(p); i++) {
      if (p[i] == '>')
        strcat(a, "1000");
      else if (p[i] == '<')
        strcat(a, "1001");
      else if (p[i] == '+')
        strcat(a, "1010");
      else if (p[i] == '-')
        strcat(a, "1011");
      else if (p[i] == '.')
        strcat(a, "1100");
      else if (p[i] == ',')
        strcat(a, "1101");
      else if (p[i] == '[')
        strcat(a, "1110");
      else if (p[i] == ']')
        strcat(a, "1111");
      t += 4;
    }
    a[t] = '\0';
    int sum = 0, x = 1;
    for (int i = t - 1; i >= 0; i--) {
      sum += ((a[i] - '0') * x) % 1000003;
      sum %= 1000003;
      x = (x << 1) % 1000003;
    }
    printf("%d\n", sum);
  }
  return 0;
}
