#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll power(ll x, ll y);
const ll MOD = 1000003;
ll convert(string s) {
  ll ans = 0;
  ll n = s.size();
  reverse(s.begin(), s.end());
  for (ll i = 0; i < n; i++) {
    if (s[i] == '1') ans = ans + power(2, i);
    ans = ans % MOD;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ll t;
  t = 1;
  while (t--) {
    vector<pair<char, string>> v;
    v.push_back(make_pair('>', "1000"));
    v.push_back(make_pair('<', "1001"));
    v.push_back(make_pair('+', "1010"));
    v.push_back(make_pair('-', "1011"));
    v.push_back(make_pair('.', "1100"));
    v.push_back(make_pair(',', "1101"));
    v.push_back(make_pair('[', "1110"));
    v.push_back(make_pair(']', "1111"));
    string a;
    cin >> a;
    string res = "";
    for (ll i = 0; i < ll((a).size()); i++) {
      for (ll j = 0; j < ll((v).size()); j++) {
        if (a[i] == v[j].first) {
          res += v[j].second;
          break;
        }
      }
    }
    cerr << "> "
         << "res"
         << " : " << res << "\n";
    ll ans = convert(res);
    cout << ans << "\n";
  }
}
ll power(ll x, ll y) {
  ll res = 1;
  x %= MOD;
  while (y > 0) {
    if (y & 1) res = (res * x) % MOD;
    y = y >> 1, x = (x * x) % MOD;
  }
  return res;
}
