#include <bits/stdc++.h>
using namespace std;
vector<short> binary(405);
const int m = 1000000 + 3;
int pow(int x, int n) {
  if (n == 0) return 1;
  if (n == 1) return 2;
  if (n == 2) return 4;
  int ans = 1;
  for (int i = 0; i < n; i++) {
    ans *= x;
    if (ans > m) ans %= m;
  }
  if (ans >= m) ans %= m;
  return (int)ans;
}
int main() {
  string s;
  getline(cin, s);
  binary.resize(0);
  for (int i = 0; i < s.length(); ++i) {
    switch (s[i]) {
      case '>':
        binary.push_back(1);
        binary.push_back(0);
        binary.push_back(0);
        binary.push_back(0);
        break;
      case '<':
        binary.push_back(1);
        binary.push_back(0);
        binary.push_back(0);
        binary.push_back(1);
        break;
      case '+':
        binary.push_back(1);
        binary.push_back(0);
        binary.push_back(1);
        binary.push_back(0);
        break;
      case '-':
        binary.push_back(1);
        binary.push_back(0);
        binary.push_back(1);
        binary.push_back(1);
        break;
      case '.':
        binary.push_back(1);
        binary.push_back(1);
        binary.push_back(0);
        binary.push_back(0);
        break;
      case ',':
        binary.push_back(1);
        binary.push_back(1);
        binary.push_back(0);
        binary.push_back(1);
        break;
      case '[':
        binary.push_back(1);
        binary.push_back(1);
        binary.push_back(1);
        binary.push_back(0);
        break;
      case ']':
        binary.push_back(1);
        binary.push_back(1);
        binary.push_back(1);
        binary.push_back(1);
        break;
    }
  }
  int ans = 0;
  for (int i = binary.size() - 1; i >= 0; --i) {
    if (binary[i]) {
      ans += pow(2, binary.size() - 1 - i);
      if (ans >= m) ans %= m;
    } else
      continue;
  }
  cout << ans;
  int n;
  cin >> n;
}
