#include <bits/stdc++.h>
int main() {
  char str[105];
  int bin[405];
  scanf("%s", str);
  int n = 0;
  int i;
  for (i = 0; i < strlen(str); i++) {
    switch (str[i]) {
      case '>':
        bin[n++] = 1;
        bin[n++] = 0;
        bin[n++] = 0;
        bin[n++] = 0;
        break;
      case '<':
        bin[n++] = 1;
        bin[n++] = 0;
        bin[n++] = 0;
        bin[n++] = 1;
        break;
      case '+':
        bin[n++] = 1;
        bin[n++] = 0;
        bin[n++] = 1;
        bin[n++] = 0;
        break;
      case '-':
        bin[n++] = 1;
        bin[n++] = 0;
        bin[n++] = 1;
        bin[n++] = 1;
        break;
      case '.':
        bin[n++] = 1;
        bin[n++] = 1;
        bin[n++] = 0;
        bin[n++] = 0;
        break;
      case ',':
        bin[n++] = 1;
        bin[n++] = 1;
        bin[n++] = 0;
        bin[n++] = 1;
        break;
      case '[':
        bin[n++] = 1;
        bin[n++] = 1;
        bin[n++] = 1;
        bin[n++] = 0;
        break;
      case ']':
        bin[n++] = 1;
        bin[n++] = 1;
        bin[n++] = 1;
        bin[n++] = 1;
        break;
    }
  }
  long long two = 1;
  int sum = 0;
  for (i = n - 1; i >= 0; i--) {
    two %= 1000003;
    sum += bin[i] * two;
    two *= 2;
    sum %= 1000003;
  }
  printf("%d", sum);
  return 0;
}
