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