#include <bits/stdc++.h>
using namespace std;
const int M = 1000003;
string s;
map<char, string> mp;
int main() {
  cin >> s;
  int n = s.size();
  mp['>'] = "1000";
  mp['<'] = "1001";
  mp['+'] = "1010";
  mp['-'] = "1011";
  mp['.'] = "1100";
  mp[','] = "1101";
  mp['['] = "1110";
  mp[']'] = "1111";
  while (n--) {
    s = mp[s[s.size() - 1]] + s;
    s.erase(s.end() - 1);
  }
  int ans = 0, k = 1;
  for (int i = s.size() - 1; i >= 0; i--) {
    ans = (ans + (s[i] - '0') * k) % M;
    k = (k * 2) % M;
  }
  cout << ans;
  return 0;
}
