#include <bits/stdc++.h>
char s[1000];
char c[1000];
void solve() {
  int i;
  strcpy(c, "");
  for (i = 0; s[i]; i++) {
    if (s[i] == '>')
      strcat(c, "1000");
    else if (s[i] == '<')
      strcat(c, "1001");
    else if (s[i] == '+')
      strcat(c, "1010");
    else if (s[i] == '-')
      strcat(c, "1011");
    else if (s[i] == '.')
      strcat(c, "1100");
    else if (s[i] == ',')
      strcat(c, "1101");
    else if (s[i] == '[')
      strcat(c, "1110");
    else if (s[i] == ']')
      strcat(c, "1111");
  }
}
void value() {
  int i, n = strlen(c) - 1;
  long long total = 0, po = 1, tt = 1;
  for (i = n; i >= 0; i--) {
    total = (total + ((c[i] - '0') * po)) % 1000003;
    po = (po * 2) % 1000003;
  }
  printf("%lld\n", total);
}
int main() {
  gets(s);
  solve();
  value();
  return 0;
}
