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;
double area_triangle(double x1, double y1, double x2, double y2, double x3,
                     double y3) {
  double a;
  a = x1 * (y2 - y3) + y1 * (x3 - x2) + ((x2 * y3) - (y2 * x3)) + 1e-9;
  a = a / 2 + 1e-9;
  return a;
}
double dist_2point(double x1, double y1, double x2, double y2) {
  double d;
  d = sqrt(pow((x1 - x2), 2) + pow((y1 - y2), 2));
  return d;
}
int binary_search(int a[], int n, int l, int u) {
  int mid;
  if (l > u) return 0;
  mid = floor(l + u) / 2;
  if (a[mid] == n)
    return mid;
  else if (a[mid] > n)
    binary_search(a, n, l, mid - 1);
  else
    binary_search(a, n, mid + 1, u);
}
int gcd(int a, int b) {
  while (b > 0) {
    a = a % b;
    a = a ^ b;
    b = b ^ a;
    a = a ^ b;
  }
  return a;
}
long lcm(long a, long b) {
  long x = (a * b) / gcd(a, b);
  return x;
}
long is_prime(long n) {
  long ii;
  if (n == 1) return 0;
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (ii = 3; ii * ii <= n; ii = ii + 2)
    if (n % ii == 0) return 0;
  return 1;
}
int main() {
  char s[2000];
  string a[20], b[20];
  a[0] = ">";
  a[1] = "<";
  a[2] = "+";
  a[3] = "-";
  a[4] = ".";
  a[5] = ",";
  a[6] = "[";
  a[7] = "]";
  b[0] = "1000";
  b[1] = "1001";
  b[2] = "1010";
  b[3] = "1011";
  b[4] = "1100";
  b[5] = "1101";
  b[6] = "1110";
  b[7] = "1111";
  while (gets(s)) {
    strlen(s);
    long int l;
    l = strlen(s);
    string ns;
    long int i, j;
    for (i = 0; i < l; i++) {
      string ss;
      ss += s[i];
      for (j = 0; j < 8; j++) {
        if (ss == a[j]) {
          ns += b[j];
          break;
        }
      }
    }
    long long p = 0, res = 0;
    for (i = ns.size() - 1; i >= 0; i--) {
      long int x = ns[i] - 48;
      long f = 1;
      for (j = 0; j < p; j++) f = (f * 2) % 1000003;
      res = (res + (x * f) % 1000003) % 1000003;
      p++;
    }
    printf("%I64d\n", res % 1000003);
  }
  return 0;
}