#include <bits/stdc++.h>
using namespace std;
int val(char c) {
  if (c == '>')
    return 8;
  else if (c == '<')
    return 9;
  else if (c == '+')
    return 10;
  else if (c == '-')
    return 11;
  else if (c == '.')
    return 12;
  else if (c == ',')
    return 13;
  else if (c == '[')
    return 14;
  else
    return 15;
}
void test() {
  string s;
  cin >> s;
  int n = s.length();
  int curr = 0;
  for (int i = 0; i < n; i++) {
    curr = ((curr * 16) % 1000003 + val(s[i])) % 1000003;
  }
  cout << curr << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    test();
  }
}
