#include <bits/stdc++.h>
using namespace std;
int Map[128];
int main() {
  Map[(int)'>'] = 8;
  Map[(int)'<'] = 9;
  Map[(int)'+'] = 10;
  Map[(int)'-'] = 11;
  Map[(int)'.'] = 12;
  Map[(int)','] = 13;
  Map[(int)'['] = 14;
  Map[(int)']'] = 15;
  string str;
  cin >> str;
  int val = 0;
  const int MOD = 1000003;
  for (int i = 0; i < ((int)((str).size())); i++) {
    val = (val << 4) + Map[(int)str[i]];
    val %= MOD;
  }
  cout << val << endl;
  return 0;
}
