#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, ss = "";
  long long sum = 0, p2 = 1;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '>')
      ss += "1000";
    else if (s[i] == '<')
      ss += "1001";
    else if (s[i] == '+')
      ss += "1010";
    else if (s[i] == '-')
      ss += "1011";
    else if (s[i] == '.')
      ss += "1100";
    else if (s[i] == ',')
      ss += "1101";
    else if (s[i] == '[')
      ss += "1110";
    else if (s[i] == ']')
      ss += "1111";
  }
  for (int i = ss.size() - 1; i >= 0; i--) {
    if (ss[i] == '1') sum += p2;
    p2 *= 2;
    p2 = p2 % 1000003;
    sum = sum % 1000003;
  }
  cout << sum;
}
