#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592653589793;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int n, sum = 0, count = 1, m = 0, t, total = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '>')
      t = 8;
    else if (s[i] == '<')
      t = 9;
    else if (s[i] == '+')
      t = 10;
    else if (s[i] == '-')
      t = 11;
    else if (s[i] == '.')
      t = 12;
    else if (s[i] == ',')
      t = 13;
    else if (s[i] == '[')
      t = 14;
    else if (s[i] == ']')
      t = 15;
    total = total * 16 + t;
    total = total % 1000003;
  }
  cout << total;
}
