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