#include <bits/stdc++.h>
using namespace std;
template <typename T>
void output(T t) {
  cout << t << "\n";
}
template <typename T, typename U, typename... G>
void output(T t, U u, G... g) {
  cout << t << " ";
  output(u, g...);
}
const int mod = 1000003;
void solve() {
  string s;
  cin >> s;
  map<char, string> mp;
  mp['>'] = "1000";
  mp['<'] = "1001";
  mp['+'] = "1010";
  mp['-'] = "1011";
  mp['.'] = "1100";
  mp[','] = "1101";
  mp['['] = "1110";
  mp[']'] = "1111";
  string p;
  for (int i = 0; i < ((int)(s).size()); ++i) {
    p += mp[s[i]];
  };
  long long ret = 0;
  for (int i = 0; i < ((int)(p).size()); ++i) {
    ret = ((ret * 2) % mod + (p[i] - '0') % mod) % mod;
  }
  output(ret);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
