#include <bits/stdc++.h>
using namespace std;
long long exp(long long a, long long b, long long mod = 1e9 + 7) {
  long long tem = 1;
  while (b) {
    if (b % 2) tem = (tem * a) % mod;
    a = (a * a) % mod;
    b = b / 2;
  }
  return tem;
}
int main() {
  map<char, string> make_pair;
  make_pair['>'] = "1000";
  make_pair['<'] = "1001";
  make_pair['+'] = "1010";
  make_pair['-'] = "1011";
  make_pair['.'] = "1100";
  make_pair[','] = "1101";
  make_pair['['] = "1110";
  make_pair[']'] = "1111";
  string b;
  cin >> b;
  string bb = "";
  long long ans = 0;
  for (int i = 0; i < b.size(); i++)
    for (int j = 0; j < make_pair[b[i]].size(); j++)
      bb.push_back(make_pair[b[i]][j]);
  for (int i = 0; i < bb.size(); i++) ans = (ans * 2 + bb[i] - '0') % 1000003;
  cout << ans;
  return 0;
}
