#include <bits/stdc++.h>   using namespace std;   int tt(char p) {     int s;     if (p ==  > )       s = 8;     else if (p ==  < )       s = 9;     else if (p ==  + )       s = 10;     else if (p ==  - )       s = 11;     else if (p ==  . )       s = 12;     else if (p ==  , )       s = 13;     else if (p ==  [ )       s = 14;     else       s = 15;     return s;   }   int main() {     string x;     int t = 0;     int q = x.length() - 1;     cin >> x;     for (int i = 0; i < x.length(); ++i) {       t = (t * 16 + tt(x[i])) % 1000003;     }     cout << t;     return 0;   }   