#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[500], sum = 0;
  string s;
  m['>'] = 8;
  m['<'] = 9;
  m['+'] = 10;
  m['-'] = 11;
  m['.'] = 12;
  m[','] = 13;
  m['['] = 14;
  m[']'] = 15;
  cin >> s;
  for (int i = 0; i < s.size(); ++i) {
    sum = sum * 16 + m[s[i]];
    sum = sum % 1000003;
  }
  cout << sum << endl;
}
