#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  string temp, str;
  int i, sum = 0, ans = 1;
  cin >> temp;
  for (i = 0; i < temp.size(); i++) {
    if (temp[i] == '>')
      str = str + "1000";
    else if (temp[i] == '<')
      str = str + "1001";
    else if (temp[i] == '+')
      str = str + "1010";
    else if (temp[i] == '-')
      str = str + "1011";
    else if (temp[i] == '.')
      str = str + "1100";
    else if (temp[i] == ',')
      str = str + "1101";
    else if (temp[i] == '[')
      str = str + "1110";
    else if (temp[i] == ']')
      str = str + "1111";
  }
  reverse(str.begin(), str.end());
  for (i = 0; i < str.size(); i++) {
    if (i == 0)
      ans = (((ans % 1000003) * (1 % 1000003)) % 1000003);
    else
      ans = (((ans % 1000003) * (2 % 1000003)) % 1000003);
    if (str[i] == '1') sum = (((sum % 1000003) + (ans % 1000003)) % 1000003);
  }
  cout << sum;
  return 0;
}
