#include <bits/stdc++.h>
using namespace std;
void S_K_S() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
bool bs(long long a[], long long l, long long r, long long key) {
  while (l <= r) {
    long long m = l + (r - l) / 2;
    if (a[m] == key)
      return true;
    else if (a[m] < key) {
      l = m + 1;
    } else
      r = m - 1;
  }
  return false;
}
long long X[] = {0, 1, 0, -1};
long long Y[] = {-1, 0, 1, 0};
bool isvalid(long long i, long long j, long long n, long long m) {
  return (i >= 0 && i < n && j >= 0 && j < m);
}
bool cmp(pair<long long, long long> p1, pair<long long, long long> p2) {
  if (p1.second == p2.second) return p1.first > p2.first;
  return p1.second > p2.second;
}
int32_t main() {
  S_K_S();
  string s, v = "><+-.,[]";
  cin >> s;
  long long ans = 0;
  for (long long i = 0; i < s.size(); i++) {
    ans = (ans * 16 + v.find(s[i]) + 8) % 1000003;
  }
  cout << ans;
}
