#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, int> a, pair<int, int> b) {
  return (a.first == b.first) ? a.second > b.second : a.first < b.first;
}
long long int modInverse(long long int a) {
  long long int m = 1000000007;
  long long int y = 0, x = 1;
  while (a > 1) {
    long long int q = a / m;
    long long int t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += 1000000007;
  return x;
}
int main() {
  char p[101];
  scanf("%s", p);
  int size(0);
  for (size_t i = 0; p[i] != 0; ++i) {
    size *= 16;
    switch (p[i]) {
      case '>':
        size += 8;
        break;
      case '<':
        size += 9;
        break;
      case '+':
        size += 10;
        break;
      case '-':
        size += 11;
        break;
      case '.':
        size += 12;
        break;
      case ',':
        size += 13;
        break;
      case '[':
        size += 14;
        break;
      case ']':
        size += 15;
        break;
      default:
        break;
    }
    size %= 1000003;
  }
  printf("%d\n", size);
  return 0;
}
