#include <bits/stdc++.h>
using namespace std;
int a[500];
char ch[1003];
int mod = 1000003;
int main() {
  a['>'] = 8;
  a['<'] = 9;
  a['+'] = 10;
  a['-'] = 11;
  a['.'] = 12;
  a[','] = 13;
  a['['] = 14;
  a[']'] = 15;
  scanf("%s", ch);
  int n = strlen(ch);
  int i;
  int sum = 0;
  for (i = 0; i <= n - 1; i++) {
    sum = (sum * 16 + a[ch[i]]) % mod;
  }
  printf("%d\n", sum);
  return 0;
}
