#include <bits/stdc++.h>
using namespace std;
long long power_mod(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  map<char, int> mp;
  mp['>'] = 1000;
  mp['<'] = 1001;
  mp['+'] = 1010;
  mp['-'] = 1011;
  mp['.'] = 1100;
  mp[','] = 1101;
  mp['['] = 1110;
  mp[']'] = 1111;
  string s;
  cin >> s;
  long long k = 0;
  long long sum = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    int temp = mp[s[i]];
    while (temp) {
      sum += (temp % 10) * (power_mod(2, k, 1000003));
      sum = sum % 1000003;
      temp = temp / 10;
      k++;
    }
  }
  cout << sum;
}
