#include <bits/stdc++.h>
int x[] = {0, -1, 0, 1, -1, 1, -1, 1};
int y[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int MOD = 1e6 + 3, N = 8e3 + 5;
const double pi = acos(-1);
using namespace std;
long long fp(long long b, long long p) {
  if (p == 0) return 1;
  long long ans = fp(b, p / 2);
  ans = (ans * ans) % MOD;
  if (p % 2 != 0) ans = (ans * (b % MOD)) % MOD;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string s;
  cin >> s;
  string t;
  for (int i = 0; i < (int)(s).size(); i++) {
    if (s[i] == '>') t += "1000";
    if (s[i] == '<') t += "1001";
    if (s[i] == '+') t += "1010";
    if (s[i] == '-') t += "1011";
    if (s[i] == '.') t += "1100";
    if (s[i] == ',') t += "1101";
    if (s[i] == '[') t += "1110";
    if (s[i] == ']') t += "1111";
  }
  long long ans = 0;
  reverse(t.begin(), t.end());
  for (int i = 0; i < (int)(t).size(); i++)
    if (t[i] == '1') ans = (ans % MOD + fp(2, i) % MOD) % MOD;
  cout << ans;
  return 0;
}
