#include <bits/stdc++.h>
using namespace std;
int a[401];
void make() {
  a[0] = 1;
  for (int i = 1; i < 401; i++) {
    a[i] = (a[i - 1] * 2) % 1000003;
  }
  return;
}
int value(string s) {
  int ans = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '1') ans = (ans + (a[s.size() - i - 1]) % 1000003) % 1000003;
  }
  return ans;
}
int main() {
  string s, k;
  cin >> s;
  make();
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '+')
      k += "1010";
    else if (s[i] == '-')
      k += "1011";
    else if (s[i] == '[')
      k += "1110";
    else if (s[i] == ']')
      k += "1111";
    else if (s[i] == '<')
      k += "1001";
    else if (s[i] == '>')
      k += "1000";
    else if (s[i] == '.')
      k += "1100";
    else if (s[i] == ',')
      k += "1101";
  }
  cout << value(k) << "\n";
  return 0;
}
