#include <bits/stdc++.h>
using namespace std;
long long j = 1;
void sieve(long long n) {
  vector<char> is_prime(n + 1, true);
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i <= n; i++) {
    if (is_prime[i] && (long long)i * i <= n) {
      for (int j = i * i; j <= n; j += i) {
        is_prime[j] = false;
      }
    }
  }
  for (long long i = 0; i < n; i++) {
    if (is_prime[i] == 1) {
      cout << i << " ";
      j++;
    }
  }
}
long long binaryexponention(long long a, long long b) {
  long long result = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      result *= a;
    }
    result %= 1000003;
    a *= a;
    a %= 1000003;
    b /= 2;
  }
  return result;
}
int bintodec(string s) {
  reverse(s.begin(), s.end());
  long long ans = 0;
  for (long long i = 0; i < s.length(); i++) {
    if (s[i] == '1') {
      ans += binaryexponention(2, i);
      ans %= 1000003;
    }
  }
  return ans;
}
void again() {
  string s, s1 = "";
  cin >> s;
  for (long long i = 0; i < s.length(); i++) {
    if (s[i] == '>') {
      s1 += "1000";
    } else if (s[i] == '<') {
      s1 += "1001";
    } else if (s[i] == '+') {
      s1 += "1010";
    } else if (s[i] == '-') {
      s1 += "1011";
    } else if (s[i] == '.') {
      s1 += "1100";
    } else if (s[i] == ',') {
      s1 += "1101";
    } else if (s[i] == '[') {
      s1 += "1110";
    } else if (s[i] == ']') {
      s1 += "1111";
    }
  }
  cout << bintodec(s1) << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  again();
}
