#include <bits/stdc++.h>
using namespace std;
string st, z;
long s, q;
long find(char a) {
  q = 0;
  while (z[q] != a) ++q;
  return q + 8;
}
int main() {
  ios_base::sync_with_stdio(0);
  z = "><+-.,[]";
  cin >> st;
  for (int i = 0; i < st.size(); ++i) s = s * 16 + find(st[i]), s %= 1000003;
  cout << s << "\n";
  return 0;
}
