#include <bits/stdc++.h>   using namespace std;   char c;   int v[300], a;   int main() {     v[ > ] = 0;     v[ < ] = 1;     v[ + ] = 2;     v[ - ] = 3;     v[ . ] = 4;     v[ , ] = 5;     v[ [ ] = 6;     v[ ] ] = 7;     while (cin >> c) a = (a * 16 + 8 + v[c]) % 1000003;     cout << a << endl;   }   