#include <bits/stdc++.h>
using namespace std;
int main() {
  long long temp = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    temp = temp * 16;
    if (s[i] == '>')
      temp += 8;
    else if (s[i] == '<')
      temp += 9;
    else if (s[i] == '+')
      temp += 10;
    else if (s[i] == '-')
      temp += 11;
    else if (s[i] == '.')
      temp += 12;
    else if (s[i] == ',')
      temp += 13;
    else if (s[i] == '[')
      temp += 14;
    else if (s[i] == ']')
      temp += 15;
    temp = temp % 1000003;
  }
  cout << temp << endl;
}
