#include <bits/stdc++.h>
using namespace std;
unsigned long long bin2int(char num[801]) {
  unsigned long long p = 0;
  for (int i = 0; i < strlen(num); i++) {
    p = p * 2 + num[i] - '0';
    p %= 1000003;
  }
  return p;
}
int main() {
  char str[101];
  char num[801] = "";
  cin >> str;
  for (int i = 0; i < strlen(str); i++) {
    switch (str[i]) {
      case '>':
        strcat(num, "1000");
        break;
      case '<':
        strcat(num, "1001");
        break;
      case '+':
        strcat(num, "1010");
        break;
      case '-':
        strcat(num, "1011");
        break;
      case '.':
        strcat(num, "1100");
        break;
      case ',':
        strcat(num, "1101");
        break;
      case '[':
        strcat(num, "1110");
        break;
      case ']':
        strcat(num, "1111");
        break;
    }
  }
  cout << bin2int(num) % 1000003 << endl;
  return 0;
}
