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