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 ll = long long;
using namespace std;
unsigned long long int leftRotate(unsigned long long int n,
                                  unsigned long long int d) {
  return (n << d) | (n >> (16 - d));
}
unsigned long long int rightRotate(unsigned long long int n,
                                   unsigned long long int d) {
  return (n >> d) | (n << (16 - d));
}
int log2(int x) {
  int res = 0;
  while (x >>= 1) res++;
  return res;
}
long long int issorted(long long int arr[], long long int n) {
  if (n == 1 || n == 0) return 1;
  if (arr[n - 1] < arr[n - 2]) return 0;
  return issorted(arr, n - 1);
}
int computeXOR(int n) {
  if (n % 4 == 0) return n;
  if (n % 4 == 1) return 1;
  if (n % 4 == 2)
    return n + 1;
  else
    return 0;
}
long long int count(string s) {
  long long int ans = 1, i, j;
  for (i = 1; i < s.length(); i++) {
    for (j = 0; j < i; j++) {
      if (s[i] == s[j]) break;
    }
    if (i == j) ans++;
  }
  return ans;
}
bool isPerfectSquare(long double x) {
  long double sr = sqrt(x);
  return ((sr - floor(sr)) == 0);
}
long long int countarray(long long int a[], long long int n) {
  unordered_set<long long int> s;
  for (long long int i = 0; i < n; i++) s.insert(a[i]);
  return s.size();
}
bool check(int N) {
  long long int i;
  if (N & (1 << i))
    return true;
  else
    return false;
}
bool isvowel(char ch) {
  string s = "aeiouAEIOU";
  for (char c : s) {
    if (c == ch) {
      return true;
    }
  }
  return false;
}
bool isPrime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
struct interval {
  int start, end;
};
bool compare(interval x, interval y) { return (x.start < y.start); }
bool isSubstring(string s1, string s2) {
  int M = s1.length();
  int N = s2.length();
  for (int i = 0; i <= N - M; i++) {
    int j;
    for (j = 0; j < M; j++)
      if (s2[i + j] != s1[j]) break;
    if (j == M) return true;
  }
  return false;
}
int seive(int n) {
  bool isprime[n + 1];
  for (int i = 2; i <= n; i++) isprime[i] = true;
  isprime[0] = false;
  isprime[1] = false;
  for (int i = 2; i <= sqrt(n); i++) {
    if (isprime[i] == true) {
      for (int j = i * i; j <= n; j += i) {
        isprime[j] = false;
      }
    }
  }
  int count = 0;
  for (int i = 0; i <= n; i++) {
    if (isprime[i] == true) count++;
  }
  return count;
}
void multiply(int a[2][2], int m[2][2]) {
  int him[2][2];
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 2; j++) {
      him[i][j] = 0;
      for (int k = 0; k < 2; k++) {
        him[i][j] += (a[i][k] * m[k][j]);
      }
    }
  }
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 2; j++) {
      a[i][j] = him[i][j];
    }
  }
}
void power(int a[2][2], int n) {
  if (n == 0 || n == 1) return;
  power(a, n / 2);
  multiply(a, a);
  if (n % 2 != 0) {
    int m[2][2] = {{1, 1}, {1, 0}};
    multiply(a, m);
  }
}
int fib(int n) {
  int a[2][2] = {{1, 1}, {1, 0}};
  if (n == 0) return 0;
  power(a, n - 1);
  return a[0][0];
}
int factmod(int n, int p) {
  int res = 1;
  while (n > 1) {
    res = (res * ((n / p) % 2 ? p - 1 : 1)) % p;
    for (int i = 2; i <= (n % p); i++) res = (res * i) % p;
    n /= p;
  }
  return res % p;
}
int bubblesort(int a[], int n) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n - 1; j++) {
      if (a[j] > a[j + 1]) {
        swap(a[j], a[j + 1]);
      }
    }
  }
}
long long int modularexponentiation(int a, long long int n, long long int m) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = ((res % m) * (a % m)) % m;
    n /= 2;
    a = ((a % m) * (a % m)) % m;
  }
  return res;
}
long long int largest_power(long long int N) {
  N = N | (N >> 1);
  N = N | (N >> 2);
  N = N | (N >> 4);
  N = N | (N >> 8);
  N = N | (N >> 16);
  return (N + 1) >> 1;
}
bool alternate(long long int n) {
  long long int i;
  if ((n ^ (n >> 1)) == (pow(2, i) - 1)) return true;
  return false;
}
long long int countDivisors(long long int n) {
  long long int cnt = 0;
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        cnt++;
      else
        cnt = cnt + 2;
    }
  }
  return cnt;
}
int highestpowerof2(int n) { return (n & (~(n - 1))); }
long long int dectobin(long long int n) {
  for (int i = 31; i >= 0; i--) {
    if (n & (1 << i))
      cout << "1";
    else
      cout << "0";
  }
}
void lowertoupper(char ch) {
  ch = ch & '_';
  cout << ch << " ";
}
void uppertolower(char ch) {
  ch = ch | ' ';
  cout << ch << " ";
}
long long int primecounter(long long int l, long long int r) {
  long long int fact = 1, count = 0;
  for (long long int i = l; i <= r; i++) {
    if (((fact - i) % ((1LL << i) - 1)) == 0) count++;
    fact *= ((1LL << i) - 1);
  }
  return count;
}
long long int counteprime(long long int l, long long int r) {
  long long int count = 0, i, j;
  for (i = l; i <= r; i++) {
    for (j = 2; j <= (i / j); j++) {
      if (!(i % j)) break;
    }
    if (j > (i / j)) count++;
  }
  return count;
}
void pairsort(int a[], char b[], int n) {
  pair<int, char> pairt[n];
  for (int i = 0; i < n; i++) {
    pairt[i].first = a[i];
    pairt[i].second = b[i];
  }
  sort(pairt, pairt + n);
  for (int i = 0; i < n; i++) {
    a[i] = pairt[i].first;
    b[i] = pairt[i].second;
  }
}
long long int fibo(long long int n) {
  long double him = (1 + sqrt(5)) / 2;
  return round(pow(him, n) / sqrt(5));
}
long long int binToDec(string c) {
  long long int count = 0;
  for (long long int i = 0; i < c.length(); i++) {
    if (c[i] == '1') {
      long long int val = 1;
      for (long long int j = 0; j < i; j++) {
        val *= 2;
      }
      count += val;
    }
  }
  return count;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  string s;
  cin >> s;
  string c = "";
  map<char, string> make_pair;
  long long int sum, count = 0, z;
  make_pair['>'] = "1000";
  make_pair['<'] = "1001";
  make_pair['+'] = "1010";
  make_pair['-'] = "1011";
  make_pair['.'] = "1100";
  make_pair[','] = "1101";
  make_pair['['] = "1110";
  make_pair[']'] = "1111";
  for (int i = 0; i < s.length(); i++) {
    c += make_pair[s[i]];
  }
  reverse(c.begin(), c.end());
  for (long long int i = 0; i < c.length(); i++) {
    if (c[i] == '1') {
      long long int val = 1;
      for (long long int j = 0; j < i; j++) {
        val *= 2;
        val %= 1000003;
      }
      count += val;
      count %= 1000003;
    }
  }
  cout << count << endl;
}