#include <bits/stdc++.h>
using namespace std;
string s, s1 = "";
long long power(int x, int po) {
  long long res = 1;
  for (int i = 0; i < po; i++) {
    res *= x % 1000003;
    res %= 1000003;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  map<char, string> mp;
  mp['>'] = "1000", mp['<'] = "1001", mp['+'] = "1010", mp['-'] = "1011",
  mp['.'] = "1100", mp[','] = "1101", mp['['] = "1110", mp[']'] = "1111";
  for (int i = 0; i < s.size(); i++) s1 += mp[s[i]];
  long long sol = 0;
  int j = s1.size() - 1;
  for (int i = 0; i < s1.size(); i++) {
    char ch = s1[i] - '0';
    sol += (power(2, j) * (ch)) % 1000003;
    j--;
  }
  cout << sol % 1000003 << endl;
  return 0;
}
