#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 100;
const double PI = 3.1415926536;
vector<string> v;
long long n, m, k, t, sum, r, l, d, b, c, a, p, e;
map<int, string> mp;
bool f;
string s;
stack<char> st;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> s;
  n = s.size();
  string x = "";
  for (int i = 0; i < n; i++) {
    if (s[i] == '>')
      x += "1000";
    else if (s[i] == '<')
      x += "1001";
    else if (s[i] == '+')
      x += "1010";
    else if (s[i] == '-')
      x += "1011";
    else if (s[i] == '.')
      x += "1100";
    else if (s[i] == ',')
      x += "1101";
    else if (s[i] == '[')
      x += "1110";
    else
      x += "1111";
  }
  reverse(x.begin(), x.end());
  n = x.size();
  for (int i = 0; i < n; i++) {
    long long left = x[i] - '0';
    if (left) {
      a = 1;
      for (int j = 0; j < i; j++) {
        a *= 2;
        a %= 1000003;
      }
      c += a;
      c %= 1000003;
    }
  }
  cout << c << endl;
  return 0;
}
