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