#include <bits/stdc++.h>
using namespace std;
const int mod = 1000003;
const int oo = 1000000000;
const int N = 0;
string GetCode(char ch) {
  switch (ch) {
    case '>':
      return "1000";
    case '<':
      return "1001";
    case '+':
      return "1010";
    case '-':
      return "1011";
    case '.':
      return "1100";
    case ',':
      return "1101";
    case '[':
      return "1110";
    case ']':
      return "1111";
  }
}
int main() {
  string s;
  cin >> s;
  int result = 0;
  for (int i = 0; i < int(s.size()); ++i) {
    string temp = GetCode(s[i]);
    for (int j = 0; j < int(temp.size()); ++j) {
      result = result * 2 + (temp[j] - '0');
      result %= mod;
    }
  }
  printf("%d\n", result);
  return 0;
}
