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