#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  map<char, string> smap;
  smap['>'] = "1000";
  smap['<'] = "1001";
  smap['+'] = "1010";
  smap['-'] = "1011";
  smap['.'] = "1100";
  smap[','] = "1101";
  smap['['] = "1110";
  smap[']'] = "1111";
  string str, temp = "";
  long cur = 1, ans = 0;
  cin >> str;
  for (int i = 0; i < str.size(); i++) temp = temp + smap[str[i]];
  for (int i = temp.size() - 1; i >= 0; i--) {
    if (temp[i] == '1') {
      ans = (ans + cur) % 1000003;
    }
    cur = (cur * 2) % 1000003;
  }
  cout << ans;
  return 0;
}
