#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000003;
const long long INF = 1e9 + 9;
const long long N = 500500;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  map<char, long long> mp;
  mp['>'] = 8;
  mp['<'] = 9;
  mp['+'] = 10;
  mp['-'] = 11;
  mp['.'] = 12;
  mp[','] = 13;
  mp['['] = 14;
  mp[']'] = 15;
  string s;
  cin >> s;
  long long p = 1, ans = 0;
  for (long long i = s.size() - 1; i >= 0; i--) {
    ans += mp[s[i]] * p;
    ans = ans % MOD;
    p = (p * 16) % MOD;
  }
  cout << ans;
  return 0;
}
