Problem: Unary is a minimalistic Brainfuck dialect in which programs are written using only one token. 

Brainfuck programs use 8 commands: "+", "-", "[", "]", "<", ">", "." and "," (their meaning is not important for the purposes of this problem). Unary programs are created from Brainfuck programs using the following algorithm. First, replace each command with a corresponding binary code, using the following conversion table: 

  * ">"  →  1000, 
  * "<"  →  1001, 
  * "+"  →  1010, 
  * "-"  →  1011, 
  * "."  →  1100, 
  * ","  →  1101, 
  * "["  →  1110, 
  * "]"  →  1111. 



Next, concatenate the resulting binary codes into one binary number in the same order as in the program. Finally, write this number using unary numeral system — this is the Unary program equivalent to the original Brainfuck one.

You are given a Brainfuck program. Your task is to calculate the size of the equivalent Unary program, and print it modulo 1000003 (106 + 3).

Input

The input will consist of a single line p which gives a Brainfuck program. String p will contain between 1 and 100 characters, inclusive. Each character of p will be "+", "-", "[", "]", "<", ">", "." or ",".

Output

Output the size of the equivalent Unary program modulo 1000003 (106 + 3).

Examples

Input

,.


Output

220


Input

++++[&gt;,.&lt;-]


Output

61425

Note

To write a number n in unary numeral system, one simply has to write 1 n times. For example, 5 written in unary system will be 11111.

In the first example replacing Brainfuck commands with binary code will give us 1101 1100. After we concatenate the codes, we'll get 11011100 in binary system, or 220 in decimal. That's exactly the number of tokens in the equivalent Unary program.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int f(long long int n) {
  if (n > 1) {
    long long int f = 1;
    for (long long int i = 2; i <= n; i++) f = f * i;
    return f;
  } else
    return 1;
}
bool isprime(long long int n) {
  if (n == 1)
    return false;
  else {
    for (long long int i = 2; i <= sqrt(n); i++)
      if (n % i == 0) return false;
    return true;
  }
}
vector<pair<long long int, long long int> > primefac(long long int n) {
  vector<pair<long long int, long long int> > a;
  long long int temp, test = 1, count;
  for (long long int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0 && isprime(i)) {
      temp = n;
      count = 0;
      while (temp % i == 0) {
        count++;
        temp = temp / i;
      }
      a.push_back({i, count});
      test = pow(i, count) * test;
    }
  }
  if (test != n) a.push_back({n / test, 1});
  return a;
}
vector<long long int> fac(long long int n) {
  vector<long long int> a;
  for (long long int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (i != n / i) {
        a.push_back(i);
        a.push_back(n / i);
      } else
        a.push_back(i);
    }
  }
  return a;
}
bool sortbysec(const pair<long long int, long long int> &a,
               const pair<long long int, long long int> &b) {
  return (a.second < b.second);
}
long long int gcd(long long int a, long long int b) {
  if (a == 0)
    return b;
  else if (b == 0)
    return a;
  else
    return gcd(b % a, a);
}
long long int ncr(long long int n, long long int r) {
  return (f(n) / (f(r) * f(n - r)));
}
vector<int> primev;
void SieveOfEratosthenes(int n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int p = 2; p <= n; p++)
    if (prime[p]) primev.push_back(p);
}
long long int sum(long long int n) {
  long long int s = 0;
  while (n) {
    s++;
    n = n / 10;
  }
  return s;
}
long long int mx = 1e9 + 7;
long long int func(long long int a, long long int b) {
  long long int ans = 1;
  for (long long int i = 0; i < b; i++) {
    ans = (ans * 2) % (1000003);
  }
  return ans;
}
void solve() {
  long long int n, c = 0, temp = 0, l = -1, r = -1, m = 0, sum = 0, s1 = 0,
                   s2 = 0;
  vector<long long int> v;
  string s, a = "";
  cin >> s;
  for (long long int i = 0; i < s.size(); i++) {
    if (s[i] == '>') a += "1000";
    if (s[i] == '<') a += "1001";
    if (s[i] == '+') a += "1010";
    if (s[i] == '-') a += "1011";
    if (s[i] == '.') a += "1100";
    if (s[i] == ',') a += "1101";
    if (s[i] == '[') a += "1110";
    if (s[i] == ']') a += "1111";
  }
  for (long long int i = 0; i < a.size(); i++) {
    if (a[i] == '1') {
      sum += func(2, a.size() - 1 - i);
      sum %= 1000003;
    }
  }
  cout << sum;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}