#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
const long long mod = 1e6 + 3;
int solve() {
  map<char, long long> m;
  m['>'] = 8;
  m['<'] = 9;
  m['+'] = 10;
  m['-'] = 11;
  m['.'] = 12;
  m[','] = 13;
  m['['] = 14;
  m[']'] = 15;
  string s;
  cin >> s;
  long long ans = 0;
  for (long long int i = 0; i < (long long int)s.size(); i++)
    ans = (ans * 16 + m[s[i]]) % mod;
  cout << ans << "\n";
  return 0;
}
int main() {
  auto start = chrono::high_resolution_clock::now();
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long test_cases = 1;
  while (test_cases--) solve();
  auto stop = chrono::high_resolution_clock::now();
  auto duration = chrono::duration_cast<chrono::milliseconds>(stop - start);
}
