#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
int main() {
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  map<char, string> m;
  m['>'] = "1000";
  m['<'] = "1001";
  m['+'] = "1010";
  m['-'] = "1011";
  m['.'] = "1100";
  m[','] = "1101";
  m['['] = "1110";
  m[']'] = "1111";
  string t;
  for (int i = 0; i < s.length(); i++) {
    t += m[s[i]];
  }
  const int mod = 1e6 + 3;
  int n = t.length();
  long long int p = 1, ans = 0;
  for (int i = n - 1; i >= 0; i--) {
    ans = (ans + int(t[i] - '0') * p % mod) % mod;
    p = p * 2 % mod;
  }
  cout << ans;
  return 0;
}
