#include <bits/stdc++.h>
using namespace std;
long long Power(long long a, long long b) {
  if (b == 0) return 1;
  long long x = Power(a, b / 2);
  x = (x * x) % 1000003;
  if (b % 2 == 1) x = (x * a) % 1000003;
  return x;
}
int main() {
  map<char, int> myMap;
  myMap['>'] = 8, myMap['<'] = 9, myMap['+'] = 10, myMap['-'] = 11;
  myMap['.'] = 12, myMap[','] = 13, myMap['['] = 14, myMap[']'] = 15;
  char str[1005];
  cin >> str;
  int len = strlen(str), sz = 0;
  long long sum = 0;
  for (int i = len - 1; i >= 0; i--) {
    int value = myMap[str[i]];
    while (value != 0) {
      int r = value % 2;
      value /= 2;
      sum += ((long long)r * Power(2, (long long)sz));
      if (sum >= 1000003) sum %= 1000003;
      sz++;
    }
  }
  cout << sum << endl;
  return 0;
}
