#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323846;
long long p = 1e6 + 3;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long sum = 0;
  string s;
  unordered_map<char, long long> r;
  cin >> s;
  r['>'] = 8, r['<'] = 9, r['+'] = 10, r['-'] = 11, r['.'] = 12, r[','] = 13,
  r['['] = 14, r[']'] = 15;
  for (int i = 0; i < s.size(); i++) {
    sum *= 16;
    sum += r[s[i]];
    sum %= p;
  }
  cout << sum;
  return 0;
}
