#include <bits/stdc++.h>
using namespace std;
map<char, string> mp;
long long big_mod(long long b, long long p) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    return (big_mod(b, p / 2) * big_mod(b, p / 2)) % 1000003;
  } else {
    return (big_mod(b, p - 1) * b) % 1000003;
  }
}
int main() {
  mp['>'] = "1000";
  mp['<'] = "1001";
  mp['+'] = "1010";
  mp['-'] = "1011";
  mp['.'] = "1100";
  mp[','] = "1101";
  mp['['] = "1110";
  mp[']'] = "1111";
  string s;
  cin >> s;
  string s1;
  for (int i = 0; i < s.size(); i++) {
    s1 += mp[s[i]];
  }
  long long ans = 0;
  int j = 0;
  for (int i = s1.size() - 1; i >= 0; i--) {
    long long tmp = s1[i] - '0';
    if (tmp == 1) {
      ans += big_mod(2, j);
      ans %= 1000003;
    }
    j++;
  }
  cout << ans << endl;
  return 0;
}
