#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e5 + 5;
const long long N = 1e9 + 7;
string alph = "abcdefghijklmnopqrstuvwxyz";
long long ModulerExponentiation(long long x, long long n, long long M) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % M;
    x = (x * x) % M;
    n = n / 2;
  }
  return result;
}
void solve() {
  string s, sum;
  cin >> s;
  map<char, string> m = {{'>', "1000"}, {'<', "1001"}, {'+', "1010"},
                         {'-', "1011"}, {'.', "1100"}, {',', "1101"},
                         {']', "1111"}, {'[', "1110"}};
  for (long long i = 0; i < s.length(); i++) {
    sum += m[s[i]];
  }
  long long ans = 0;
  for (long long i = sum.length() - 1; i >= 0; i--) {
    long long x = 0;
    if (sum[i] == '1')
      x = ModulerExponentiation(2LL, (long long)sum.size() - i - 1, 1000003LL);
    ans = ((ans % 1000003) + (x % 1000003)) % 1000003;
  }
  cout << ans;
}
int32_t main() {
  solve();
  return 0;
}
