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;
vector<int> pri;
void sieve() {
  bool f[1000007];
  f[0] = f[1] = 1;
  for (int i = 2; i < 1000007; ++i) {
    if (f[i]) continue;
    pri.push_back(i);
    for (int j = i * i; i <= 10000 && j < 1000007; j += i) f[j] = 1;
  }
}
bool prime(int x) {
  if (x == 2) return true;
  if (x < 2 || x % 2 == 0) return false;
  for (int i = 3; i * i <= x; i += 2)
    if (x % i == 0) return false;
  return true;
}
vector<int> factor;
void GetFactor(int n) {
  for (int i = 2; i <= n / i; ++i) {
    while (n % i == 0) {
      factor.push_back(i);
      n /= i;
    }
  }
  if (n != 1) factor.push_back(n);
}
long long MaxSubarray(long long arr[], int n) {
  long long best = -1e18, sum = 0;
  for (int i = 0; i < n; ++i) {
    sum = max(arr[i], arr[i] + sum);
    best = max(best, sum);
  }
  return best;
}
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
long long LCM(long long a, long long b) { return a / GCD(a, b) * b; }
long long fast_power(long long b, long long p) {
  long long res = 1;
  while (p) {
    if (p % 2) res = (res * b) % 1000003;
    b = (b * b) % 1000003;
    p /= 2;
  }
  return res;
}
bool isvalid(int r, int c, int R, int C) {
  return (r >= 0 && r < R && c >= 0 && c < C);
}
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, 1, -1};
int main() {
  unsigned long long ans = 0;
  string s, t = "";
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '>')
      t += "1000";
    else if (s[i] == '<')
      t += "1001";
    else if (s[i] == '+')
      t += "1010";
    else if (s[i] == '-')
      t += "1011";
    else if (s[i] == ',')
      t += "1101";
    else if (s[i] == '.')
      t += "1100";
    else if (s[i] == '[')
      t += "1110";
    else
      t += "1111";
  }
  for (int i = t.size() - 1, n = 0; i >= 0; i--, n++) {
    unsigned long long k = ((t[i] - '0') * fast_power(2, n));
    ans += k;
  }
  cout << ans % 1000003;
  return 0;
}