#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, val = "><+-.,[]";
  cin >> s;
  long long int size = 0;
  for (int i = 0; i < s.size(); i++) {
    size = (size * 16 + val.find(s[i]) + 8) % 1000003;
  }
  cout << size;
}
