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