#include <bits/stdc++.h>
using namespace std;
void c_p_c() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  c_p_c();
  unordered_map<char, int> dict{{'>', 8},  {'<', 9},  {'+', 10}, {'-', 11},
                                {'.', 12}, {',', 13}, {'[', 14}, {']', 15}};
  string line;
  cin >> line;
  int mod = 1000003;
  int total = 0;
  for (int i = 0; i < line.size(); i++) {
    total *= 16;
    total += dict[line[i]];
    total %= mod;
  }
  cout << total << endl;
  return 0;
}
