#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  long long int size = 0;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    size *= 16;
    switch (s[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 = size % 1000003;
  }
  cout << size << endl;
}
