#include <bits/stdc++.h>
using namespace std;
int main() {
  map<char, string> mp = {{'>', "1000"}, {'<', "1001"}, {'+', "1010"},
                          {'-', "1011"}, {'.', "1100"}, {',', "1101"},
                          {'[', "1110"}, {']', "1111"}};
  string in;
  cin >> in;
  string s;
  for (int i = 0; i < in.length(); i++) {
    s += mp[in[i]];
  }
  int sum = 0;
  int p = 1;
  for (int i = s.length() - 1; i >= 0; i--) {
    sum += (p * (s[i] - '0')) % (int)(1e6 + 3);
    sum %= (int)(1e6 + 3);
    p *= 2;
    p %= (int)(1e6 + 3);
  }
  cout << sum << endl;
}
