#include <bits/stdc++.h>
using namespace std;
const int mod = 1000003;
int main() {
  int ans = 0, count = 0, res = 0;
  string arr[8] = {"0001", "1001", "0101", "1101",
                   "0011", "1011", "0111", "1111"};
  string s, safe("><+-.,[]"), bin;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    int x = safe.find(s[i]);
    bin += arr[x];
  }
  for (int i = 0; i < bin.size(); i++) {
    if (bin[i] == '1') {
      res += pow(2, count);
    }
    count++;
    if (count == 4) {
      count = 0;
      ans = (ans * 16 + res) % mod;
      res = 0;
    }
  }
  cout << ans;
  return 0;
}
