#include <bits/stdc++.h>
using namespace std;
int power(int n, int p) {
  if (p == 0) return 1;
  if (p == 1) return n % 1000003;
  if (p % 2 == 0) {
    long long int k = (power(n, p / 2) % 1000003);
    return (k * k) % 1000003;
  } else {
    long long int k = (power(n, p / 2) % 1000003);
    k = (k * k) % 1000003;
    k = k * n;
    return k % 1000003;
  }
  return -1;
}
int main() {
  string str;
  string s;
  cin >> str;
  int len = str.length();
  for (int i = 0; i < len; i++) {
    if (str[i] == '>') {
      s = s + "1000";
      continue;
    }
    if (str[i] == '<') {
      s = s + "1001";
      continue;
    }
    if (str[i] == '+') {
      s = s + "1010";
      continue;
    }
    if (str[i] == '-') {
      s = s + "1011";
      continue;
    }
    if (str[i] == '.') {
      s = s + "1100";
      continue;
    }
    if (str[i] == ',') {
      s = s + "1101";
      continue;
    }
    if (str[i] == '[') {
      s = s + "1110";
      continue;
    }
    if (str[i] == ']') {
      s = s + "1111";
      continue;
    }
  }
  reverse(s.begin(), s.end());
  int k = 0;
  len = s.length();
  for (int i = 0; i < len; i++) {
    if (s[i] == '1') {
      k = k + power(2, i);
      k = k % 1000003;
    }
  }
  cout << k << endl;
  return 0;
}
