#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int l = s.length();
  int n = 0, sum = 0, m = 1000003;
  for (int i = l - 1; i >= 0; i--) {
    int x = 1;
    if (i < l - 1) {
      for (int j = 0; j < n; j++) {
        x = x * 2;
        if (x >= m) {
          x = x % m;
        }
      }
    }
    if (s[i] == '>') {
      sum = (sum + 8 * x) % m;
      n = n + 4;
      continue;
    }
    if (s[i] == '<') {
      sum = (sum + 9 * x) % m;
      n = n + 4;
      continue;
    }
    if (s[i] == '+') {
      sum = (sum + 10 * x) % m;
      n = n + 4;
      continue;
    }
    if (s[i] == '-') {
      sum = (sum + 11 * x) % m;
      n = n + 4;
      continue;
    }
    if (s[i] == '.') {
      sum = (sum + 12 * x) % m;
      n = n + 4;
      continue;
    }
    if (s[i] == ',') {
      sum = (sum + 13 * x) % m;
      n = n + 4;
      continue;
    }
    if (s[i] == '[') {
      sum = (sum + 14 * x) % m;
      n = n + 4;
      continue;
    }
    if (s[i] == ']') {
      sum = (sum + 15 * x) % m;
      n = n + 4;
      continue;
    }
  }
  cout << sum;
}
