#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592653589793238460;
int64_t power(int64_t n, int64_t p) {
  int64_t ans = 1;
  while (p) {
    if (p & 1) {
      ans *= n;
      ans %= 1000003;
    }
    p /= 2;
    n *= n;
    n %= 1000003;
  }
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  map<char, string> mp;
  mp['>'] = "1000";
  mp['<'] = "1001";
  mp['+'] = "1010";
  mp['-'] = "1011";
  mp['.'] = "1100";
  mp[','] = "1101";
  mp['['] = "1110";
  mp[']'] = "1111";
  string intm = "";
  for (char i : s) intm += mp[i];
  int64_t ans = 0;
  for (int64_t i = intm.size() - 1; i >= 0; i--) {
    if (intm[i] == '1') {
      int64_t kk = power(2, intm.size() - 1 - i);
      kk %= 1000003;
      ans += kk;
      ans %= 1000003;
    }
  }
  cout << ans << '\n';
  return 0;
}
