#include <bits/stdc++.h>
using namespace std;
string getNumber(char c) {
  if (c == '>')
    return "1000";
  else if (c == '<')
    return "1001";
  else if (c == '+')
    return "1010";
  else if (c == '-')
    return "1011";
  else if (c == '.')
    return "1100";
  else if (c == ',')
    return "1101";
  else if (c == '[')
    return "1110";
  else if (c == ']')
    return "1111";
  else
    return "0000";
}
string str;
string number;
int memo[500];
void init() {
  memo[0] = 1;
  for (int i = 0; i < 490; i++) {
    memo[i + 1] = (memo[i] * 2) % 1000003;
  }
}
int main() {
  init();
  cin >> str;
  int len = str.length();
  number = "";
  for (int i = 0; i < len; i++) {
    string tmp = getNumber(str[i]);
    number += tmp;
  }
  int ans = 0;
  for (int i = number.length() - 1; i >= 0; i--) {
    if (number[i] == '1') {
      ans += memo[number.length() - i - 1];
    }
  }
  cout << ans % 1000003 << endl;
}
