#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T pow(T a, T b, long long int m) {
  T ans = 1;
  while (b > 0) {
    if (b % 2 == 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans % m;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string ar = "><+-.,[]";
  string s;
  cin >> s;
  int cnt = 0;
  for (int i = 0; i < s.size(); ++i) {
    int ans = 0;
    for (int j = 0; j < ar.size(); ++j) {
      cerr << s[i] << " " << ar[j] << '\n';
      if (s[i] == ar[j]) {
        ans = j;
        break;
      }
    }
    cnt = (cnt * 16 + (8 + ans)) % 1000003;
  }
  cout << cnt;
  return 0;
}
