#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <cmath>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <queue>
#include <stack>
#include <deque>
#include <assert.h>
#include <ctime>
#include <bitset>
#include <numeric>
#include <complex>
#include <valarray>
#define MAX 100001
#define MOD 1000003
#define ll long long
using namespace std;
int main(){
ios_base :: sync_with_stdio(false) ; cin.tie(0) ; cout.tie(0) ;
map<char, string> map;
string input, ans;
ll i, x, len, val=0, pw;
map['>'] = "1000" ; map['<'] = "1001" ; map['+'] = "1010" ; map['-'] = "1011" ;
map['.'] = "1100" ; map[','] = "1101" ; map['['] = "1110" ; map[']'] = "1111" ;
cin >> input;
for(i = 0; i < input.size(); ++i) {
ans += map[input[i]];
}
len = ans.length();
x=len - 1;
for(i=len - 1; i >= 0; --i) {
pw = pow(2,x - i) ;
if(ans[i] == '1') val = (val%MOD + pw % MOD)%MOD;
}
cout << val <<"\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4KI2luY2x1ZGUgPGZzdHJlYW0+CiNpbmNsdWRlIDxzc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNpbmNsdWRlIDxjc3RkaW8+CiNpbmNsdWRlIDxzdHJpbmc+CiNpbmNsdWRlIDx2ZWN0b3I+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDxjc3RkbGliPgojaW5jbHVkZSA8Y3N0cmluZz4KI2luY2x1ZGUgPG1hcD4KI2luY2x1ZGUgPHF1ZXVlPgojaW5jbHVkZSA8c2V0PgojaW5jbHVkZSA8cXVldWU+CiNpbmNsdWRlIDxzdGFjaz4KI2luY2x1ZGUgPGRlcXVlPgojaW5jbHVkZSA8YXNzZXJ0Lmg+CiNpbmNsdWRlIDxjdGltZT4KI2luY2x1ZGUgPGJpdHNldD4KI2luY2x1ZGUgPG51bWVyaWM+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