#include <bits/stdc++.h>
using namespace std;
long long val(char a) {
  long long n;
  switch (a) {
    case '>':
      n = 8;
      break;
    case '<':
      n = 9;
      break;
    case '+':
      n = 10;
      break;
    case '-':
      n = 11;
      break;
    case '.':
      n = 12;
      break;
    case ',':
      n = 13;
      break;
    case '[':
      n = 14;
      break;
    case ']':
      n = 15;
      break;
    default:
      n = -1;
  }
  return n;
}
long long powr(long long a, int n) {
  long long p = 1;
  for (int i = 0; i < n; i++) {
    p *= a;
    p = p % 1000003;
  }
  return p;
}
int main() {
  string str;
  cin >> str;
  int n = str.length();
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    sum += ((val(str[i]) * powr(2, 4 * (n - i - 1))) % 1000003);
    sum = sum % 1000003;
  }
  cout << sum;
  return 0;
}
