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 PYTHON3):

Solution:
import time
import io
import math
import random

def timer(f):
    def tmp(*args, **kwargs):
        t = time.time()
        res = f(*args, **kwargs)
        print ("Time : %f" % (time.time()-t))
        return res

    return tmp

def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

def f(a, b):
    return Value(gcd(a.val, b.val))

class Value:
    val = 0
    def __init__(self, val):
        self.val = val

    def __str__(self):
        return str(self.val)

    @staticmethod
    def zero():
        return Value(1)

    @staticmethod
    def dif(a, b):
        return Value(a.val - b.val)

class BinaryTree():
    leftChild = None
    rightChild= None
    value = None
    left=0;
    right=0;

    def __init__(self, left, right, value, leftBound, rightBound):
        self.leftChild = left
        self.rightChild = right
        self.value = value;
        self.left = leftBound
        self.right = rightBound

    def print(self, indent):
        if self.leftChild == None:
            return str(self.value)+" ("+str(self.left)+" - "+str(self.right)+")";
        else:
            sleft = self.leftChild.print(indent+1)
            sright = self.rightChild.print(indent+1)
            return str(self.value)+" ("+str(self.left)+" - "+str(self.right)+")"+'\n'+("   "*indent)+sleft+"\n"+("   "*indent)+sright

    @staticmethod
    def build(array, left, right, f):
        if left == right :
            return BinaryTree(None, None, array[left], left, right)
        else:
            middle = (left+right)//2
            leftTree = BinaryTree.build(array, left, middle, f)
            rightTree = BinaryTree.build(array, middle+1, right, f)
            value = f(leftTree.value, rightTree.value)
            return BinaryTree(leftTree, rightTree, value, left, right)

    def query(self, fr, to, f):
        if fr > to:
            return Value.zero()
        if self.left == fr and self.right == to:
            return self.value
        else:
            middle = (self.left+self.right)//2
            leftVal = self.leftChild.query(fr, min(middle, to), f)
            rightVal = self.rightChild.query(max(middle+1, fr), to, f)
            return f(leftVal, rightVal)

    def modify(self, index, newValue, f):
        dif = Value.dif(newValue, self.query(index, index,f))
        if index == self.left and index == self.right:
            self.value = newValue
        else:
            middle = (self.left+self.right)//2
            self.value = f(self.value, dif)
            if index <= middle:
                self.leftChild.modify(index, newValue, f)
            else:
                self.rightChild.modify(index, newValue, f)


@timer
def use():
    array = []
    #for i in range(4):
    #array.append(Value(i+1))

    array.append(Value(4))
    array.append(Value(6))
    array.append(Value(12))
    array.append(Value(4))

    segmentTree = BinaryTree.build(array, 0, len(array)-1, f)
    print(segmentTree.print(1))
    print(segmentTree.query(1, 3, f))
    segmentTree.modify(3, Value(5), f)
    print(segmentTree.print(1))
    print(segmentTree.query(1, 3, f))

#use(
#print(V, a, k)

str = input()
dv = "";
for i in range(len(str)):
    if(str[i] == '>'):
        dv+="1000"
    if(str[i] == '<'):
        dv+="1001"
    if(str[i] == '+'):
        dv+="1010"
    if(str[i] == '-'):
        dv+="1011"
    if(str[i] == '.'):
        dv+="1100"
    if(str[i] == ','):
        dv+="1101"
    if(str[i] == '['):
        dv+="1110"
    if(str[i] == ']'):
        dv+="1111"



summ = 0;
for i in range(len(dv)):
    if dv[i] == '1':
        summ+=2**(len(dv)-i-1)

print(summ%1000003)