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