#include <bits/stdc++.h>
using namespace std;
int code(char c) {
  switch (c) {
    case '>':
      return 8;
    case '<':
      return 9;
    case '+':
      return 10;
    case '-':
      return 11;
    case '.':
      return 12;
    case ',':
      return 13;
    case '[':
      return 14;
    case ']':
      return 15;
  }
  return 0;
}
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(NULL);
  cout << (fixed) << setprecision(6);
  string s;
  while (cin >> s) {
    int res = 0;
    for (int i = 0, _a = (s.length()); i < _a; i++) {
      res = (res * 16 + code(s[i])) % 1000003;
    }
    cout << res << endl;
  }
  return 0;
}
