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