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