#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 1303;
long long solve() {
  long long n;
  string s;
  cin >> s;
  map<char, string> mp;
  mp['>'] = "1000";
  mp['<'] = "1001";
  mp['+'] = "1010";
  mp['-'] = "1011";
  mp['.'] = "1100";
  mp[','] = "1101";
  mp['['] = "1110";
  mp[']'] = "1111";
  n = s.size();
  string tmp = "";
  for (long long i = 0; i < n; ++i) tmp += mp[s[i]];
  reverse((tmp).begin(), (tmp).end());
  long long ans = 0;
  long long p = 1;
  for (auto x : tmp)
    ans = (ans + ((x - '0') % 1000003 * (p % 1000003)) % 1000003) % 1000003,
    p <<= 1, p %= 1000003;
  cout << ans;
  return 0;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve(), cout << endl;
  cerr << (float)clock() / CLOCKS_PER_SEC << " secs\n";
  return 0;
}
