#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e6 + 3;
long long power(int n) {
  int ans = 1;
  for (int i = 1; i <= n; i++) {
    ans = ((ans % MOD) * 2) % MOD;
  }
  return (ans % MOD);
}
int main() {
  map<char, string> mp;
  mp['>'] = "1000";
  mp['<'] = "1001";
  mp['+'] = "1010";
  mp['-'] = "1011";
  mp['.'] = "1100";
  mp[','] = "1101";
  mp['['] = "1110";
  mp[']'] = "1111";
  string t;
  cin >> t;
  string an = "";
  for (int i = 0; i < t.size(); i++) {
    an += mp[t[i]];
  }
  long long a = 0;
  for (int i = 0; i < an.size(); i++) {
    if (an[i] == '1') {
      a = (a % MOD + (power(an.size() - 1 - i))) % MOD;
    }
  }
  cout << a << endl;
  return 0;
}
