#include <bits/stdc++.h>
using namespace std;
int ara[3000];
int i, j, k, l, x, y, z, m, n;
char c;
string a;
int power(int x) {
  int i, j = 0;
  int ans = 1;
  for (i = 0; i < x; i++) {
    ans = (ans * 16) % 1000003;
  }
  return ans;
}
int main() {
  cin >> a;
  for (i = 0; i < a.size(); i++) {
    if (a[i] == '>')
      ara[i] = 8;
    else if (a[i] == '<')
      ara[i] = 9;
    else if (a[i] == '+')
      ara[i] = 10;
    else if (a[i] == '-')
      ara[i] = 11;
    else if (a[i] == '.')
      ara[i] = 12;
    else if (a[i] == ',')
      ara[i] = 13;
    else if (a[i] == '[')
      ara[i] = 14;
    else if (a[i] == ']')
      ara[i] = 15;
  }
  l = a.size();
  y = 0;
  for (i = l - 1, j = 0; i >= 0; i--, j++) {
    y = (y + (ara[i] * power(j))) % 1000003;
  }
  printf("%d", y);
  return 0;
}
