#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000003;
int power(int y) {
  int res = 1;
  for (int i = 0; i < y; ++i) res = ((res % MOD) << 4) % MOD;
  return res;
}
int main() {
  string s;
  cin >> s;
  long long res = 0;
  for (int i = 0; i < s.length(); ++i) {
    switch (s[i]) {
      case '>':
        res = (res + 8 * power(s.length() - i - 1)) % MOD;
        break;
      case '<':
        res = (res + 9 * power(s.length() - i - 1)) % MOD;
        break;
      case '+':
        res = (res + 10 * power(s.length() - i - 1)) % MOD;
        break;
      case '-':
        res = (res + 11 * power(s.length() - i - 1)) % MOD;
        break;
      case '.':
        res = (res + 12 * power(s.length() - i - 1)) % MOD;
        break;
      case ',':
        res = (res + 13 * power(s.length() - i - 1)) % MOD;
        break;
      case '[':
        res = (res + 14 * power(s.length() - i - 1)) % MOD;
        break;
      case ']':
        res = (res + 15 * power(s.length() - i - 1)) % MOD;
        break;
    }
  }
  cout << res;
}
