#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[101], c[] = {"><+-.,[]"};
  cin >> a;
  int sum = 0;
  for (int i = 0; a[i]; i++) {
    for (int j = 0; j < 8; j++) {
      if (a[i] == c[j]) {
        sum = (sum * 16 + 8 + j) % 1000003;
        break;
      }
    }
  }
  cout << sum;
}
