#include <bits/stdc++.h>
using namespace std;
string mapping(char ch) {
  if (ch == '>') return "1000";
  if (ch == '<') return "1001";
  if (ch == '+') return "1010";
  if (ch == '-') return "1011";
  if (ch == '.') return "1100";
  if (ch == ',') return "1101";
  if (ch == '[') return "1110";
  if (ch == ']') return "1111";
}
int main() {
  string s;
  cin >> s;
  string ans;
  for (int i = 0; i < s.size(); i++) {
    ans += mapping(s[i]);
  }
  long long res = 0;
  for (int i = 0; i < ans.size(); i++) {
    res = ((res * 2) % 1000003) + (ans[i] - '0');
    res = res % 1000003;
  }
  res = res % 1000003;
  cout << res;
}
