#include <bits/stdc++.h>
using namespace std;
const int mod = 1e6 + 3;
int main() {
  char str[1005];
  char s[20] = "><+-.,[]";
  scanf("%s", str);
  int len = strlen(str);
  int ans = 0;
  for (int i = 0; i < len; i++) {
    int pos = 0;
    for (int j = 0; j < 8; j++) {
      if (str[i] == s[j]) pos = j;
    }
    ans = (ans * 16 + (pos + 8)) % mod;
  }
  printf("%d\n", ans);
}
