#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int MOD = 1e6 + 3;
char c[] = {'>', '<', '+', '-', '.', ',', '[', ']'};
string bin[] = {"1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"};
map<char, string> m;
string s;
int pw = 1, ans = 0;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  for (int i = 0; i < 8; ++i) {
    m[c[i]] = bin[i];
  }
  cin >> s;
  for (int i = s.size() - 1; i >= 0; --i) {
    string x = m[s[i]];
    for (int j = 3; j >= 0; --j) {
      ans += (x[j] == '1') * pw;
      ans %= MOD;
      pw = (pw * 2) % MOD;
    }
  }
  cout << ans;
  return 0;
}
