#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, k;
  long long int len, x = 1000003;
  long long int sum = 0;
  string s, bin;
  cin >> s;
  len = s.length();
  for (i = 0; i < len; i++) {
    if (s[i] == '>')
      bin += "1000";
    else if (s[i] == '<')
      bin += "1001";
    else if (s[i] == '+')
      bin += "1010";
    else if (s[i] == '-')
      bin += "1011";
    else if (s[i] == '.')
      bin += "1100";
    else if (s[i] == ',')
      bin += "1101";
    else if (s[i] == '[')
      bin += "1110";
    else if (s[i] == ']')
      bin += "1111";
  }
  len = bin.length();
  long long int a[len];
  long long int prod = 1;
  for (i = 0; i < len; i++) {
    a[i] = prod;
    prod = ((prod % x) * (2 % x)) % x;
  }
  j = len - 1;
  for (i = 0; i < len; i++) {
    if (bin[i] == '1') sum += (a[j] % x);
    j--;
  }
  cout << sum % x << endl;
  return 0;
}
