#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  unordered_map<char, string> umap = {
      {'>', "1000"}, {'<', "1001"}, {'+', "1010"}, {'-', "1011"},
      {'.', "1100"}, {',', "1101"}, {'[', "1110"}, {']', "1111"}};
  string input, binary;
  cin >> input;
  for (int i = 0; i < input.size(); i++) {
    binary.append(umap[input[i]]);
  }
  int result = 0, val = 1;
  for (int i = binary.size() - 1; i >= 0; i--) {
    result += (binary[i] - 48) * val;
    result %= 1000003;
    val *= 2;
    val %= 1000003;
  }
  cout << result << "\n";
  return 0;
}
