#include <bits/stdc++.h>
using namespace std;
const double pi = (2 * acos(0));
struct point {
  long double x, y;
};
double area(int x1, int y1, int x2, int y2, int x3, int y3) {
  double a =
      (x2 * y3) - (x3 * y2) - (x1 * y3) + (x3 * y1) + (x1 * y2) - (x2 * y1);
  a /= 2;
  return fabs(a);
}
long long ncr(long long n, long long r) {
  long long sum = 1;
  long long f = 2;
  for (long long i = n - r + 1; i <= n; i++) {
    sum *= i;
    if (sum % f == 0 && r >= f) sum /= f++;
  }
  if (r >= f) {
    for (long long i = f; i <= r; i++) sum /= i;
  }
  return sum;
}
long double anyarea(point p[], int n) {
  long double sum1 = p[n - 1].x * p[0].y, sum2 = p[n - 1].y * p[0].x;
  for (int i = 0; i < n - 1; i++) {
    sum1 += p[i].x * p[i + 1].y;
    sum2 += p[i].y * p[i + 1].x;
  }
  return fabs((sum1 - sum2) * 0.5);
}
long long fastpow(long long base, long long p, long long m) {
  if (p == 0) return 1;
  long long ans = fastpow(base, p / 2, m);
  ans = ((ans % m) * (ans % m)) % m;
  if (p % 2) ans = ((base % m) * ans) % m;
  return ans;
}
long long GCD(long long M, long long m) {
  if (M % m == 0) return m;
  M %= m;
  long long x1 = M, x2 = m;
  m = min(x1, x2);
  M = max(x1, x2);
  return GCD(M, m);
}
long long lcm(long long M, long long m) {
  return (M * m) / GCD(max(M, m), min(M, m));
}
int main() {
  map<char, string> mp;
  mp['>'] = "1000";
  mp['<'] = "1001";
  mp['+'] = "1010";
  mp['-'] = "1011";
  mp['.'] = "1100";
  mp[','] = "1101";
  mp['['] = "1110";
  mp[']'] = "1111";
  string s1, s;
  cin >> s1;
  for (int i = 0; i < s1.size(); i++) {
    s += mp[s1[i]];
  }
  long long ans = 0;
  int mod = 1000003;
  for (int i = 0; i < s.size(); i++) {
    ans = ((ans % mod) +
           ((s[s.size() - 1 - i] - '0') * (fastpow(2, i, mod))) % mod) %
          mod;
  }
  cout << ans;
}
