#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 123;
const int inf = 1e9 + 123;
const long long mod = 1e6 + 3;
string second, t;
int main() {
  cin >> second;
  for (int i = 0; i < second.size(); i++) {
    if (second[i] == ',') {
      t += "1101";
    }
    if (second[i] == '.') {
      t += "1100";
    }
    if (second[i] == '+') {
      t += "1010";
    }
    if (second[i] == '-') {
      t += "1011";
    }
    if (second[i] == '<') {
      t += "1001";
    }
    if (second[i] == '>') {
      t += "1000";
    }
    if (second[i] == ']') {
      t += "1111";
    }
    if (second[i] == '[') {
      t += "1110";
    }
  }
  long long k = 0, id = 0;
  for (int j = t.size() - 1; j >= 0; j--) {
    if (t[j] == '1') {
      k += (fmod(pow(2, id), mod));
      k = k % mod;
    }
    id++;
  }
  k = k % mod;
  cout << k;
  return 0;
}
