#include <bits/stdc++.h>
using namespace std;
long long bigmod(long long a, long long b, long long m) {
  long long x;
  if (b == 0) return 1;
  if (b % 2 == 0) {
    x = bigmod(a, b / 2, m);
    return ((x % m) * (x % m)) % m;
  }
  return ((a % m) * bigmod(a, b - 1, m) % m);
}
int main() {
  string s;
  cin >> s;
  map<char, string> mp;
  mp['>'] = "1000";
  mp['<'] = "1001";
  mp['+'] = "1010";
  mp['-'] = "1011";
  mp['.'] = "1100";
  mp[','] = "1101";
  mp['['] = "1110";
  mp[']'] = "1111";
  long long lim = s.size(), p = 0, sum = 0, i;
  for (i = lim - 1; i >= 0; i--) {
    string x = mp[s[i]];
    for (long long j = 3; j >= 0; j--) {
      if (x[j] == '0') {
        sum += 0;
        p++;
      } else {
        sum += bigmod(2, p++, 1000003);
      }
    }
  }
  printf("%lld\n", sum % 1000003);
  return 0;
}
