#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000003;
string s;
map<char, int> mp;
int ans;
int main() {
  mp['>'] = 8;
  mp['<'] = 9;
  mp['+'] = 10;
  mp['-'] = 11;
  mp['.'] = 12;
  mp[','] = 13;
  mp['['] = 14;
  mp[']'] = 15;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    ans = ((ans * 16) % MOD + mp[s[i]]) % MOD;
  }
  return cout << ans << endl, 0;
}
