#include <bits/stdc++.h>
using namespace std;
template <typename T>
T Gmax(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
T Gmin(T a, T b) {
  return a < b ? a : b;
}
const int N = 1000003;
map<char, int> m;
int main() {
  m['>'] = 8, m['<'] = 9, m['+'] = 10, m['-'] = 11, m['.'] = 12, m[','] = 13;
  m['['] = 14, m[']'] = 15;
  char str[1000];
  scanf("%s", str);
  int len = strlen(str);
  int sum = 0;
  int k = 1;
  for (int i = len - 1; i >= 0; i--) {
    sum = (sum + m[str[i]] * k % N) % N;
    k = k * 16 % N;
  }
  printf("%d\n", sum % N);
  return 0;
}
