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

Solution:
//to find the required decimal digits

/*
import java.util.*;
import java.lang.*;
public class cf37
{
	public static void main(String args[])
	{
		cf37 obj=new cf37();
		Scanner scan=new Scanner(System.in);
		String s[][]=new String[8][4];
		String s1="><+-.,[]";
		char s2[]=new char[8];
		s2=s1.toCharArray();
		String is=new String();
		String f="";
		char ic[]=new char[100];
		int i,eight=8,j=0;
		for(i=0;i<8;i++)
		{
			//s[i][0]=scan.nextLine();
			//s[i][0]="l";
			s[i][0]=String.valueOf(s2[i]);
			s[i][1]=obj.binary((eight)+i);
		}		
		//for(i=0;i<8;i++)
		{
			//System.out.println(s[i][0]+" "+s[i][1]);
		}
		is=scan.nextLine();
		ic=is.toCharArray();
		for(i=0;i<ic.length;i++)
		{
			//f=null;
			for(j=0;j<8;j++)
			{
				//if(ic[i]==char.ValueOf(s[j][0]))
				//System.out.println(ic[i]+" "+s[j][0]);
				//System.out.println(String.valueOf(ic[i])==s[j][0]?1:0);
				//System.out.println(Character.toString(ic[i])==s[j][0]?1:0);
				//System.out.println(Character.toString(ic[i]).equals(s[j][0])?1:0);
				//if(String.valueOf(ic[i])!=s[j][0])
				//if(Character.toString(ic[i])==s[j][0])
				if(Character.toString(ic[i]).equals(s[j][0]))
				{
					//System.out.println(s[j][1]);
					f=f+s[j][1];
					//f=f.concat(s[j][1]);
					//System.out.println("final string ="+f);
				}
			}
		}
		//System.out.println("final string ="+f);
		System.out.println(obj.printDecimal(Double.valueOf(f)));
	}
	String binary(int dn)
	{
		int r,bn=0,ten=1;
		while(dn!=0)
		{
			r=dn%2;
			bn=bn+ten*r;
			ten=ten*10;
			dn=dn/2;
		}
		//System.out.println(bn);
		return Integer.toString(bn);
		//return String.valueOf(bn);
	}
	//int printDecimal(int bn)
	int printDecimal(double bn)
	{
		int dn=0,r,two=1;
		while(bn!=0)
		{
			r=(int)bn%10;
			bn=bn/10;
			dn=dn+two*r;
			two=two*2;
			dn=dn%1000003;
		}
		//System.out.println(dn);
		return dn;
	}
}
*/
import java.util.*;
import java.math.*;
public class cf37
{
	public static void main(String[] args)
	{
		String un="><+-.,[]";
		Scanner sc=new Scanner(System.in);
		String inp=sc.next();
		String bin="";
		
		for(int i=0;i<inp.length();i++)
			bin+=Integer.toBinaryString((un.indexOf(inp.charAt(i))+8));
		
		BigInteger b=new BigInteger(bin,2).mod(new BigInteger("1000003"));
		
		System.out.println(b);
	}
}