const   ma=1000003;
var
        c:char;
        i,j,k:longint;

function cha:longint;
begin
        j:=0;
        case c of
        '>':j:=0; '<':j:=1; '+':j:=2;
        '-':j:=3; '.':j:=4; ',':j:=5;
        '[':j:=6; ']':j:=7;
        end;
        exit(j+8);
end;

begin
        repeat read(c); k:=(k*16+cha) mod ma; until eoln;
        writeln(k);
end.

const nab='><+-.,[]';

var s:string;
    i,sum:longint;
 begin
  read(s);
  for i:=1 to length(s) do
   sum:=(sum*16+7+pos(s[i],nab))mod 1000003;
  write(sum);
 end.

program uio;
 var s,s1:ansistring;
     cis,st:int64;
     d,i:longint;

BEGIN

 readln(s1); s:='';
  for i:=1 to length(s1) do
   begin
    if s1[i]='>' then s:=s+'1000';
    if s1[i]='<' then s:=s+'1001';
    if s1[i]='+' then s:=s+'1010';
    if s1[i]='-' then s:=s+'1011';
    if s1[i]='.' then s:=s+'1100';
    if s1[i]=',' then s:=s+'1101';
    if s1[i]='[' then s:=s+'1110';
    if s1[i]=']' then s:=s+'1111';
   end;

 st:=1; cis:=0; d:=length(s);

  for i:=d downto 1 do
   begin
    st:=st mod 1000003; cis:=cis mod 1000003;
    if s[i]='1' then begin
                      inc(cis,st);
                     end;

    st:=st*2;
   end;

 writeln(cis mod 1000003);

END.

{$O-}
var
   i,n,a,b,ans	:	longint;
   p,q  : int64;
   s,t		:	string;
begin
//   reset(input,'a.in');  rewrite(output,'a.out');
    readln(s);
    for i:=1 to length(s) do
    	if s[i] = '>' then t:=t + '1000' else
    	if s[i] = '<' then t:=t + '1001' else
    	if s[i] = '+' then t:=t + '1010' else
    	if s[i] = '-' then t:=t + '1011' else
    	if s[i] = '.' then t:=t + '1100' else
    	if s[i] = ',' then t:=t + '1101' else
    	if s[i] = '[' then t:=t + '1110' else
    	if s[i] = ']' then t:=t + '1111';
    for i:=length(t) downto 1 do begin
    	a:=2;
    	b:=length(t) - i;
    	p:=1;
    	q:=2;
    	if t[i] = '1' then begin
    		while b > 0 do begin
    			if b mod 2 = 1 then p:=(p * q) mod 1000003;
    			q:=(q * q) mod 1000003;
    			b:=b div 2;
    		end;
    		ans:=(ans + p) mod 1000003;
    	end;
    end;
    write(ans);
end.

var ss, s:string;
    l, i:longint;
    aa, ans:int64;
begin

//assign(input, 'input.txt'); reset(input);
//assign(output, 'output.txt'); rewrite(output);

readln(s);
l:=length(s);

ss:='';
for i:=1 to l do
 begin
 case s[i] of
  '>': ss:=ss+'1000';
  '<': ss:=ss+'1001';
  '+': ss:=ss+'1010';
  '-': ss:=ss+'1011';
  '.': ss:=ss+'1100';
  ',': ss:=ss+'1101';
  '[': ss:=ss+'1110';
  ']': ss:=ss+'1111';
 end;

 end;

l:=l*4; aa:=1;
for i:=l downto 1 do
 begin
 if ss[i]='1' then ans:=(ans+aa) mod 1000003;
 aa:=(aa*2) mod 1000003;
 end;

writeln(ans);

//close(input); close(output);

end.

const
str = '><+-.,[]';

var
s : ansistring;
i,j,ans : longint;

begin
     readln(s);
     ans := 0;
     for i := 1 to length(s) do
     begin
          ans := (ans * 16 + pos(s[i],str) + 7) mod 1000003;
     end;
     writeln(ans);
     //readln;
end.

var
  s,tek : ansistring;
   answer,step : int64;
    i,leng : longint;

begin

  readln(tek);
   leng:=length(tek); s:='';
    for i:=1 to leng do
     begin

       if tek[i]='>' then s:=s+'1000';
        if tek[i]='<' then s:=s+'1001';
         if tek[i]='+' then s:=s+'1010';
          if tek[i]='-' then s:=s+'1011';
          if tek[i]='.' then s:=s+'1100';
         if tek[i]=',' then s:=s+'1101';
        if tek[i]='[' then s:=s+'1110';
       if tek[i]=']' then s:=s+'1111';

     end;

  leng:=length(s);
   answer:=0; step:=1;
    for i:=leng downto 1 do
     begin

       if s[i]='1' then answer:=(answer+step) mod 1000003;
        step:=step*2 mod 1000003;

     end;
  writeln(answer);

end.

program b;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  i : integer;
  s : string;
  cur : integer;
  res : int64;
begin
  readln (s);
  res := 0;
  for i := 1 to length (s) do
   begin
    case s[i] of
      '>' : cur := 8;
      '<' : cur := 9;
      '+' : cur := 10;
      '-' : cur := 11;
      '.' : cur := 12;
      ',' : cur := 13;
      '[' : cur := 14;
      ']' : cur := 15;
    end;

    res := (res * 16) mod 1000003;
    res := res + cur;
   end;

   writeln (res);

   readln;
   readln;
end.

program calendar;
{$APPTYPE CONSOLE}
uses
  SysUtils;

var  a: array [char] of integer;
     s: string;
     p,i,o,j:integer;
begin
a['>']:=8;
a['<']:=9;
a['+']:=10;
a['-']:=11;
a['.']:=12;
a[',']:=13;
a['[']:=14;
a[']']:=15;
p:=1; o:=0;
readln(s);
for i:= length(s) downto 1 do
 begin
 o:=(o+(p*a[s[i]])) mod 1000003;
 p:=(p*16) mod 1000003;
 end;
write(o);

read(i);
end.

const q='><+-.,[]';
var c:char;
    k:int64;
begin
   k:=0;
   while not eoln do
      begin
         read(c);
         k:=(k*16+7+pos(c,q))mod round(1e6+3);
      end;
   writeln(k);
end.

Program LL;
Var
    s,s1:ansistring;
	i,j,k,m,n,p,q:longint;
	ans,tot,sum:int64;

Begin
	 readln(s);
     for i:=1 to length(s) do
       begin
          if s[i]='>' then
           begin
              s1:=s1+'1000';
           end;
          if s[i]='<' then
           begin
              s1:=s1+'1001';
           end;
          if s[i]='+' then
           begin
              s1:=s1+'1010';
           end;
          if s[i]='-' then
           begin
              s1:=s1+'1011';
           end;
          if s[i]='.' then
           begin
              s1:=s1+'1100';
           end;
          if s[i]=',' then
           begin
              s1:=s1+'1101';
           end;
          if s[i]='[' then
           begin
              s1:=s1+'1110';
           end;
          if s[i]=']' then
           begin
              s1:=s1+'1111';
           end;
       end;
     for i:=1 to length(s1) do
      begin
          sum:=1;
           for j:=1 to length(s1)-i do
            begin
               sum:=(sum*2) mod 1000003;
            end;
          sum:=sum*(ord(s1[i])-48);
          ans:=(ans+sum) mod 1000003;
      end;
     writeln(ans);
End.

program Project2;

{$APPTYPE CONSOLE}

var
  s, s1: ansistring;
  i: longint;
  ans: int64;
  a: array[-1..500] of int64;

begin
  {assignfile(input, 'input.txt');
  reset(input);
  assignfile(output, 'output.txt');
  rewrite(output);     }

  read(s);

  s1 := '';
  for i := 1 to length(s) do
    case s[i] of
      '>': s1 := s1 + '1000';
      '<': s1 := s1 + '1001';
      '+': s1 := s1 + '1010';
      '-': s1 := s1 + '1011';
      '.': s1 := s1 + '1100';
      ',': s1 := s1 + '1101';
      '[': s1 := s1 + '1110';
      ']': s1 := s1 + '1111';
    end;

  a[0] := 1;
  for i := 1 to length(s1) + 1 do
    a[i] := (a[i - 1] * 2) mod 1000003;

  ans := 0;

  for i := length(s1) downto 1 do begin
    if s1[i] = '1' then
      ans := (ans + a[length(s1) - i]) mod 1000003;
  end;

  write(ans);

 // read(ans);

  closefile(input);
  closefile(output);
end.

program ProjectA;

{$APPTYPE CONSOLE}
{$A+,B-,D-,E+,F+,G-,I-,L-,N+,R-,Q-,S-,V+,X+}

uses
  SysUtils,
  Math;

const
  inf = 1000000000000000000;
  base = 1000003;

var
  s: string;
  i, n: integer;
  res: int64;

procedure panic(x: integer);
begin
  write(x);
  halt(0);
end;

procedure swap(var qx, qy: integer);
var
  qz: integer;
begin
  qz := qx;
  qx := qy;
  qy := qz;
end;

function f(ch: char): integer;
begin
  if ch = '>' then
    f := 8;
  if ch = '<' then
    f := 9;
  if ch = '+' then
    f := 10;
  if ch = '-' then
    f := 11;
  if ch = '.' then
    f := 12;
  if ch = ',' then
    f := 13;
  if ch = '[' then
    f := 14;
  if ch = ']' then
    f := 15;
end;

begin
  {$IFNDEF ONLINE_JUDGE}
  Reset(input, 'input.txt');
  Rewrite(output, 'output.txt');
  {$ENDIF}

  readln(s);
  n := length(s);
  res := 0;
  for i := 1 to n do
    res := (16 * res + f(s[i])) mod base;

  write(res);

end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

const m = 1000003;

function pow(k:integer):integer;
var
   res,i:integer;
begin
   res:=1;
   for i:=1 to k do
     res:=(res*2) mod m;
   pow:=res;
end;

function calc(s:string):integer;
var
   res,i:integer;
begin
   res:=0;
   for i:=1 to length(s) do
      res:=(res+(Ord(s[i])-48)*Pow(length(s)-i)) mod m;
   calc:=res;
end;

var
   n,i:integer;
   //a:array[1..100] of integer;
   s,st:string;
begin
   //reset(input,'input.txt');
   //rewrite(output,'output.txt');
   ReadLn(s);
   st:='';
   for i:=1 to length(s) do
    begin
      if s[i]='>' then st:=st+'1000';
      if s[i]='<' then st:=st+'1001';
      if s[i]='+' then st:=st+'1010';
      if s[i]='-' then st:=st+'1011';
      if s[i]='.' then st:=st+'1100';
      if s[i]=',' then st:=st+'1101';
      if s[i]='[' then st:=st+'1110';
      if s[i]=']' then st:=st+'1111';
    end;
   writeln(calc(st));
end.

program unuary;
const modulo =1000003;

var s,c,z:String;
    i:longint;
    l,q,ans2:int64;

function numb(c:char):string;
begin
  numb:='';

  if(c='>') then numb:='1000';
  if(c='<') then numb:='1001';
  if(c='+') then numb:='1010';
  if(c='-') then numb:='1011';
  if(c='.') then numb:='1100';
  if(c=',') then numb:='1101';
  if(c='[') then numb:='1110';
  if(c=']') then numb:='1111';

end;

function makebinary(c:string):int64;
var i,e:longint;
    ans,l:int64;
begin

  l:=length(c);
  ans:=0;

  for i:=l downto 1 do begin
    val(c[i],e);
    ans:=(ans+(q*e)) mod modulo;
    q:=(q*2) mod modulo;
  end;

  makebinary:=ans;
end;

begin
  readln(s);
  l:=length(s);
  q:=1;

  for i:=l downto 1 do begin
    c:=numb(s[i]);
    ans2:=(makebinary(c)+ans2) mod modulo;
  end;

  writeln(ans2);

end.

uses math;
const fi='';
      fo='';
      modul=round(1e6)+3;
var f1,f2:text;
    mu:array[0..401] of longint;
    c:array[chr(1)..chr(255)] of string;
    a,s:ansistring;
procedure mo;
begin
assign(f1,fi);
reset(f1);
assign(F2,fo);
rewrite(f2);
end;

procedure dong;
begin
close(F1);
close(f2);
end;

procedure nhap;
var i,j:longint;
    kq:int64;
begin
kq:=0;
    c['>']:= '1000';
    c['<']:= '1001';
    c['+']:= '1010';
    c['-']:= '1011';
    c['.']:= '1100';
    c[',']:= '1101';
    c['[']:= '1110';
    c[']']:= '1111';
mu[0]:=1;
a:='';
for i:=1 to 400 do
  mu[i]:=(mu[i-1]*2) mod modul;
readln(F1,S);
for i:=1 to length(s) do
  a:=a+c[s[i]];
j:=length(a);
for i:=1 to j do
  if a[i]='1' then
    kq:=(kq+mu[j-i]) mod modul;
writeln(F2,kq);
end;

BEGIN
mo;
nhap;
Dong;
END.

var
s,a:ansistring;
i:longint;
p,ans:qword;
begin
readln(s);
for i:=1 to length(s) do
begin
if s[i]='>' then a:=a+'1000';
if s[i]='<' then a:=a+'1001';
if s[i]='+' then a:=a+'1010';
if s[i]='-' then a:=a+'1011';
if s[i]='.' then a:=a+'1100';
if s[i]=',' then a:=a+'1101';
if s[i]='[' then a:=a+'1110';
if s[i]=']' then a:=a+'1111';
end;
p:=1;
for i:=length(a) downto 1 do
begin
if a[i]='1' then ans:=(ans+p) mod 1000003;
p:=p*2; p:=p mod 1000003;
end;
writeln(ans);
end.

const
 s:string=('><+-.,[]');
 a:array[1..8]of string=('1000','1001','1010','1011','1100','1101','1110','1111');
var
 c:char;
 i,t,j,k,kk:longint;
 g:ansistring;
begin
 while not eoln do
 begin
  read(c);
  g:=g+a[pos(c,s)];
 end;
 for i:=length(g) downto 1 do if g[i]='1' then
 begin
  t:=1;
  for j:=1 to length(g)-i do t:=(t*2) mod 1000003;
  k:=(k+t) mod 1000003;
 end;
 writeln(k);
end.

{$r-, s-, q-, i-, o+}
const
  base = round(1e6) + 3;
var
  s, t : ansistring;
  n, i, j, p, ans : longint;
  brainfuck : array [1..8] of ansistring = ('>', '<', '+', '-', '.', ',', '[', ']');
  unary : array [1..8] of ansistring = ('1000', '1001', '1010', '1011', '1100', '1101', '1110', '1111');
begin
  readln(s);
  n := length(s);
  for i := 1 to n do
    for j := 1 to 8 do
      if (s[i] = brainfuck[j]) then
        t := t + unary[j];
  n := length(t);
  p := 1;
  for i := n downto 1 do
    begin
      ans := (ans + (ord(t[i]) - ord('0')) * p) mod base;
      p := (p + p) mod base;
    end;
  writeln(ans);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var i, m, st, ans : longint;
    s, s2 : string;
begin
 // reset(input,'input.txt');
 // rewrite(output,'output.txt');

  readln(s);
  s2 := '';
  for i := 1 to length(s) do
  begin
    if s[i] = '>' then s2 := s2 + '1000';
    if s[i] = '<' then s2 := s2 + '1001';
    if s[i] = '+' then s2 := s2 + '1010';
    if s[i] = '-' then s2 := s2 + '1011';
    if s[i] = '.' then s2 := s2 + '1100';
    if s[i] = ',' then s2 := s2 + '1101';
    if s[i] = '[' then s2 := s2 + '1110';
    if s[i] = ']' then s2 := s2 + '1111';
  end;
  m := 1000003;
  st := 1;
  ans := 0;
  for i := length(s2) downto 1 do
  begin
    ans := (ans + strtoint(s2[i])*st) mod m;
    st := (st*2) mod m;
  end;
  write(ans);
end.

PROGRAM B;
const fi = '';
      fo = '';
      e  = 1000003;
      st = '><+-.,[]';
      a  : array[1..8] of string = ('1000', '1001', '1010', '1011', '1100', '1101', '1110', '1111');
var   s, g   : ansistring;
      res, d : int64;
      i, j   : longint;

BEGIN
   assign(input, fi); reset(input);
   assign(output, fo); rewrite(output);
   readln(s);
   for i:= 1 to length(s) do
      begin
         j:= pos(s[i], st);
         g:= g + a[j];
      end;
   d:= 1;
   for i:= length(g) downto 1 do
      begin
         if g[i] = '1' then res:= (res + d) mod e;
         d:= (d * 2) mod e;
      end;
   writeln(res);
   close(input); close(output);
END.

{$MODE OBJFPC}
const max=1000003;
type ii = integer;
var
    st :string;
    i, cur, num: ii;
    res : int64;
begin
  readln (st);
  for i := 1 to length(st) do
  begin
    case st[i] of
      '>' : num := 8;
      '<' : num := 9;
      '+' : num := 10;
      '-' : num := 11;
      '.' : num := 12;
      ',' : num := 13;
      '[' : num := 14;
      ']' : num := 15;
    end;
    res := (res*16 + num) mod max;
  end;
writeln (res);
end.

const
  ABC='><+-.,[]';
var
  res,i:longint;
  s:ansistring;

begin
  readln(s);
  res:=0;
  for i:=1 to length(s)do res:=(res*16+7+pos(s[i],ABC))mod 1000003;
  writeln(res);
end.

program A_HQ9;

{$APPTYPE CONSOLE}

uses
  SysUtils;
type myarray=array[0..10000] of longint;
const base=1000003;
var a,res : myarray;
    s,str : string;
    i,j,k : longint;
procedure pr(var a  : myarray);
var z,o : longint;
begin
 o:=a[1]*2;
 z:=1;
 a[1]:=0;
 while o>0 do
  begin
   o:=o+a[z];
   a[z]:=o mod base;
   o:=o div base;
   inc(z);
  end;
 if z-1>a[0] then a[0]:=z-1;
end;
procedure sum(var res,a : myarray);
var z,o : longint;
begin
 o:=0;
 z:=1;
 while (a[0]>=z) or (res[0]>=z) or (o>0) do
  begin
   o:=o+a[z]+res[z];
   res[z]:=o mod base;
   o:=o div base;
   inc(z);
  end;
 if z-1>res[0] then res[0]:=z-1;
end;
function ost(var res : myarray; g : longint) : longint;
var z,o : longint;
begin
 o:=0;
 for i:=res[0] downto 1 do
  begin
   o:=o*base+res[i];
   o:=o mod g;
  end;
 ost:=o;
end;
begin
 readln(s);
 str:='';
 for i:=1 to length(s) do
  begin
   case s[i] of
    '>' : str:=str+'1000';
    '<' : str:=str+'1001';
    '+' : str:=str+'1010';
    '-' : str:=str+'1011';
    '.' : str:=str+'1100';
    ',' : str:=str+'1101';
    '[' : str:=str+'1110';
    ']' : str:=str+'1111';
   end;
  end;
 for i:=1 to length(str) do
  begin
   fillchar(a,sizeof(a),0);
   if str[i]='1' then
    begin
     a[0]:=1;
     a[1]:=1;
     for j:=1 to length(str)-i do pr(a);
     sum(res,a);
    end;
 end;
 writeln(res[1]);
end.

var
q:char;
r,i,j:longint;
s,s1:ansistring;
 begin
   s:='';
   readln(s1);
   for i:=1 to length(s1) do
      begin
       q:=s1[i];
       if q='>' then s:=s+'1000'
        else if q='<' then s:=s+'1001'
         else if q='+' then s:=s+'1010'
          else if q='-' then s:=s+'1011'
           else if q='.' then s:=s+'1100'
            else if q=',' then s:=s+'1101'
            else if q='[' then s:=s+'1110'
            else s:=s+'1111';
      end;
   r:=0;
   for i:=1 to length(s) do
    begin
     r:=r*2;
     r:=r+ord(s[i])-48;
     r:=r mod 1000003;
    end;
   writeln(r);
 end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  list=array[1..1000000]of integer;
var
  i:Integer;
  s,s1:string;
function lol(s:string):Int64;
var
  k,i,j,n,code:Integer;
  g,a:Int64;
begin
  k:=0;
  g:=0;
  a:=0;
  n:=Length(s)-1;
  for i:=1 to Length(s) do
    begin
      if (s[i]='0') then g:=(g mod 1000003)*2
        else g:=(g mod 1000003)*2+1;
    end;
  lol:=g;
end;
begin
  Readln(s);
  s1:='';
  for i:=1 to Length(s) do
    begin
      if (s[i]='>') then s1:=s1+'1000';
      if (s[i]='<') then s1:=s1+'1001';
      if (s[i]='+') then s1:=s1+'1010';
      if (s[i]='-') then s1:=s1+'1011';
      if (s[i]='.') then s1:=s1+'1100';
      if (s[i]=',') then s1:=s1+'1101';
      if (s[i]='[') then s1:=s1+'1110';
      if (s[i]=']') then s1:=s1+'1111';
    end;
  Writeln(lol(s1)mod 1000003);
  Readln;
  Readln;
end.

var k:Int64;
i:Integer;
s:string;
x:LongInt;
begin
  //reset(input,'input.txt');
  //rewrite(output,'output.txt');
  Readln(s);
  for i:=1 to Length(s) do
  begin
     case s[i] of
      '>':x:=8;
      '<':x:=9;
      '+':x:=10;
      '-':x:=11;
      '.':x:=12;
      ',':x:=13;
      '[':x:=14;
      ']':x:=15;
    end;
    k:=(k*16+x)mod 1000003;
  end;
  Writeln(k);
end.

program B;
const m = 1000*1000+3;
var i,res,p,j : longint; s : string;
    a : array[0..7] of char = ('>','<','+','-','.',',','[',']');
begin
  {assign(input,'input.txt'); reset(input);}
  {assign(output,'output.txt'); rewrite(output);}
  readln(s);
  p:= 1; res:= 0;
  for i:= length(s) downto 1 do begin
    for j:= 0 to 7 do
      if s[i] = a[j] then res:= (res + ((p mod m)*(j+8)) mod m) mod m;
    p:= (p*16) mod m;
  end;

  writeln(res mod m);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var s,ans:string;
    i,x:integer;

function binpow(a,n:int64):int64;
var b:int64;
begin
if n=0 then binpow:=1
       else if n mod 2=1 then binpow:=((binpow(a,n-1) mod 1000003)*a) mod 1000003
                         else begin
                              b:=binpow(a, n div 2) ;//mod 1000003;
                              binpow:=(b mod 1000003*b) mod 1000003;
                              end;
end;

begin

ans:='';

 readln(s);
 for i:=1 to length(s) do
 begin
 if s[i]='>' then ans:=ans+'1000';
 if s[i]='<' then ans:=ans+'1001';
 if s[i]='+' then ans:=ans+'1010';
 if s[i]='-' then ans:=ans+'1011';
 if s[i]='.' then ans:=ans+'1100';
 if s[i]=',' then ans:=ans+'1101';
 if s[i]='[' then ans:=ans+'1110';
 if s[i]=']' then ans:=ans+'1111';
 end;
x:=0;
for i:=1 to length(ans) do
if ans[i]='1' then
 x:=((x mod 1000003)+binpow(2,length(ans)-i))mod 1000003;
write(x);
readln;
end.

program fgdfgd;

{$APPTYPE CONSOLE}
uses
  SysUtils,
  Math;

var n,i,j,k,ans,l:integer;
    s:string;

begin
  //reset(input,  'input.txt');
  //rewrite(output,  'output.txt');
  read(s);
  ans:=0;
  l:=1;
  for i:=length(s) downto 1 do begin
if s[i]='>' then ans:=(ans+(l*8) mod 1000003) mod 1000003;
if s[i]='<' then ans:=(ans+(l*9) mod 1000003) mod 1000003;
if s[i]='+' then ans:=(ans+(l*10) mod 1000003) mod 1000003;
if s[i]='-' then ans:=(ans+(l*11) mod 1000003) mod 1000003;
if s[i]='.' then ans:=(ans+(l*12) mod 1000003) mod 1000003;
if s[i]=',' then ans:=(ans+(l*13) mod 1000003) mod 1000003;
if s[i]='[' then ans:=(ans+(l*14) mod 1000003) mod 1000003;
if s[i]=']' then ans:=(ans+(l*15) mod 1000003) mod 1000003;

    l:=l*16 mod 1000003;
  end;
  write(ans);

end.

program p_b;

{$APPTYPE CONSOLE}
{$H+}

uses
  SysUtils;

const
  cut = 1000003;

type
	int  = integer;

var
	s, def, tmp: string;
  i, res, pow, sum: int;

function Bin(x: int): string;
begin
	result := '';
  while x <> 0 do begin
  	result := inttostr(x mod 2) + result;
    x := x div 2;
  end;

  while (length(result) < 4) do begin
    result := '0' + result;
  end;
end;

begin
	def := '><+-.,[]';

  readln(s);

  tmp := '';
  for i := 1 to length(s) do
    tmp := tmp + bin(Pos(s[i], def) + 7);

  res := 0;
  pow := 1;
  for i := length(tmp) downto 1 do begin
  	sum := (pow * strtoint(tmp[i])) mod cut;
    res := res mod cut + sum;
    pow := (pow * 2) mod cut;
    res := res mod cut;
  end;

  write(res);

end.

const
 st='><+-.,[]';
 md=round(1e6+3);

var
  a:Array[0..1000,0..1000]of char;
  i,n,m,j,kol,sum:longint;
  t:string;
begin
  read(t);
  n:=length(t);
  for i:=1 to n do
     sum:=(sum*16+7+pos(t[i],st))mod md;
 write(sum);
end.

const fi='';
      e=1000003;
var   kq:longint;
      st:string;
      a:array['+'..']'] of string;
      du:array[0..1000] of longint;
procedure   nhap;
var   i,j:longint;
begin
   assign(input,fi);
   reset(input);
   readln(st);
   kq:=0;
   a['+']:= '1010' ;
   a['-']:= '1011';
   a['<']:='1001';
   a['>']:='1000';
   a['.']:= '1100';
   a[',']:='1101';
   a['[']:='1110';
   a[']']:=  '1111';
   du[0]:=1;
   for i:=1 to 1000 do
      du[i]:=(du[i-1]*2) mod e;
   for i:=length(St) downto 1 do
      for j:=4 downto 1 do
         begin
            if a[st[i]][j]='1' then
               kq:=(kq+du[4*(length(st)-i)+4-j]) mod e;
         end;
   close(input);
   write(kq);
end;
begin
   nhap;
end.

var m,l,sum,i:longint;
    s:string;

procedure plus(m:integer);
 var x,l:longint;
begin
x:=1;
for l:=1 to m-1 do x:=x*2mod 1000003;
sum:=(sum+x) mod 1000003;
end;
begin
readln(s);
m:=length(s);
for l:=m downto 1 do
begin
i:=m-l+1;
if s[l]='>' then plus(i*4) else
if s[l]='<' then begin plus(i*4); plus(i*4-3); end else
if s[l]='+' then begin plus(i*4); plus(i*4-2); end else
if s[l]='-' then begin plus(i*4); plus(i*4-2);plus(i*4-3); end else
if s[l]='.' then begin plus(i*4); plus(i*4-1); end else
if s[l]=',' then begin plus(i*4); plus(i*4-1);plus(i*4-3); end else
if s[l]='[' then begin plus(i*4); plus(i*4-2);plus(i*4-1); end else
if s[l]=']' then begin plus(i*4); plus(i*4-2);plus(i*4-3);plus(i*4-1) end;
end;
writeln(sum mod 1000003);
end.

Const dict='><+-.,[]';
Var r,i,l,k:LongInt;
    s:String;

Begin
     Readln (s);
     r:=0;
     l:=Length (s);
     For I:=1 to l do
     Begin
          k:=Pos (s[i],dict);
          r:=r*16+7+k;
          r:=r mod 1000003;
     End;
     Writeln (r);
End.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
 n,i,sum,j,x,z,f,f1,se,se1:integer;
 s,k,p:string;

 function per(k:string):int64;
   var
   i:integer;
   r:int64;
   begin
     r:=0;
     for i:=1 to length(k) do
     if k[i]='0' then r:=(r mod 1000003)*2
     else  r:=(r mod 1000003)*2+1;
   per:=r;
   end;

  begin
 readln(s);
 for i:=1 to length(s) do
  begin
   if s[i]='>' then k:='1000';
   if s[i]='<' then k:='1001';
   if s[i]='[' then k:='1110';
   if s[i]=']' then k:='1111';
   if s[i]='+' then k:='1010';
   if s[i]='-' then k:='1011';
   if s[i]='.' then k:='1100';
   if s[i]=',' then k:='1101';
  p:=p+k;
  end;
  writeln(per(p) mod 1000003);

end.

var
  a: ansistring;
  f: array [0..1000] of longint;
  s: ansistring;
  ans,i,j: longint;
begin
  a := '><+-.,[]';
  f[1]:=8;
  for i := 2 to 8 do f[i]:=f[i-1]+1;
  readln(s);
  for i:=1 to length(s) do
    for j:=1 to 8 do
      if s[i]=a[j] then ans:=(ans*16+f[j]) mod 1000003;
  writeln(ans);
end.

uses
        SysUtils, Math;

const
        MD = 1000003;

var
        i, ls : longint;
        s : string;
        ans, x : int64;

begin
        readln(s);
        ls := length(s);
        ans := 0;
        x := 1;
        for i := ls downto 1 do begin
                if s[i] = '>' then begin
                        x := x shl 3 mod MD;
                        inc(ans, x);
                end else
                if s[i] = '<' then begin
                        inc(ans, x);
                        x := x shl 3 mod MD;
                        inc(ans, x);
                end else
                if s[i] = '+' then begin
                        x := x shl 1 mod MD;
                        inc(ans, x);
                        x := x shl 2 mod MD;
                        inc(ans, x);
                end else
                if s[i] = '-' then begin
                        inc(ans, x);
                        x := x shl 1 mod MD;
                        inc(ans, x);
                        x := x shl 2 mod MD;
                        inc(ans, x);
                end else
                if s[i] = '.' then begin
                        x := x shl 2 mod MD;
                        inc(ans, x);
                        x := x shl 1 mod MD;
                        inc(ans, x);
                end else
                if s[i] = ',' then begin
                        inc(ans, x);
                        x := x shl 2 mod MD;
                        inc(ans, x);
                        x := x shl 1 mod MD;
                        inc(ans, x);
                end else
                if s[i] = '[' then begin
                        x := x shl 1 mod MD;
                        inc(ans, x);
                        x := x shl 1 mod MD;
                        inc(ans, x);
                        x := x shl 1 mod MD;
                        inc(ans, x);
                end else
                if s[i] = ']' then begin
                        inc(ans, x);
                        x := x shl 1 mod MD;
                        inc(ans, x);
                        x := x shl 1 mod MD;
                        inc(ans, x);
                        x := x shl 1 mod MD;
                        inc(ans, x);
                end;
                ans := ans mod MD;
                x := x shl 1;
        end;
        write(ans mod MD);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
const p = 1000003;
var s: string;
i,j,sum : integer;
begin
 readln(s);
 sum := 0;
 for i := 1 to length(s) do
  begin
  sum := sum * 16;
  if s[i] = '>' then sum := sum + 8;
  if s[i] = '<' then sum := sum + 9;
  if s[i] = '+' then sum := sum + 10;
  if s[i] = '-' then sum := sum + 11;
  if s[i] = '.' then sum := sum + 12;
  if s[i] = ',' then sum := sum + 13;
  if s[i] = '[' then sum := sum + 14;
  if s[i] = ']' then sum := sum + 15;
  sum := sum mod p;

  end;
 writeln(sum);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  i: integer;
  n: int64;
  s, t: string;
  a: array[-1..10000] of int64;

begin
{  reset(input, 'input.txt');
  rewrite(output, 'output.txt');}

  readln(s);

  a[0] := 1;
  for i := 1 to 10000 do
    a[i] := (a[i - 1] * 2) mod 1000003;

  t := '';
  for i := 1 to length(s) do begin
    case s[i] of
      '>': t := t + '1000';
      '<': t := t + '1001';
      '+': t := t + '1010';
      '-': t := t + '1011';
      '.': t := t + '1100';
      ',': t := t + '1101';
      '[': t := t + '1110';
      ']': t := t + '1111';
    end;
  end;

  n := 0;
  for i := 1 to length(t) do begin
    if (t[i] = '1') then
      n := (n + a[length(t) - i]) mod 1000003;
  end;

  writeln(n);
end.

program task_b;

{$APPTYPE CONSOLE}
const d: array[1..8]of char = ('>','<','+','-','.',',','[',']');
      b: array[1..8]of string = ('1000','1001','1010','1011','1100','1101','1110','1111');
      md = round(1e6)+3;
var s,tmp: string;
    i,j,ans: integer;
begin
  readln(s);
  ans:=0;
  for i:=1 to length(s)do begin
    for j:=1 to 8 do
      if (s[i]=d[j])then begin
        tmp:=b[j];
        break;
      end;
    for j:=1 to 4 do
      ans:=(ans*2 mod md + ord(tmp[j])-ord('0'))mod md;
  end;
  write(ans);
end.

program Project1;

{$APPTYPE CONSOLE}
function step(i : longint): longint;
var
   j: longint;
   q : longint;
begin
  q := 1;
  for j:= 1 to i do
    q := q * 2 mod 1000003;
  step := q mod 1000003;
end;
var
   str: string;
   j, sum: longint;
   i: longint;
   a: array[1..400] of longint;
begin
 //reset(input, 'input.txt');
 //rewrite(output, 'output.txt');
  readln(str);
  j := 1;
  for i := 1 to length(str) do
  begin
    if str[i] = '>' then
    begin
      a[j] := 1;
      a[j + 1] := 0;
      a[j + 2] := 0;
      a[j + 3] := 0;
      inc(j, 4)
    end;
        if str[i] = '<' then
    begin
      a[j] := 1;
      a[j + 1] := 0;
      a[j + 2] := 0;
      a[j + 3] := 1;
      inc(j, 4)
    end;
        if str[i] = '+' then
    begin
      a[j] := 1;
      a[j + 1] := 0;
      a[j + 2] := 1;
      a[j + 3] := 0;
      inc(j, 4)
    end;
        if str[i] = '-' then
    begin
      a[j] := 1;
      a[j + 1] := 0;
      a[j + 2] := 1;
      a[j + 3] := 1;
      inc(j, 4)
    end;
        if str[i] = '.' then
    begin
      a[j] := 1;
      a[j + 1] := 1;
      a[j + 2] := 0;
      a[j + 3] := 0;
      inc(j, 4)
    end;
    if str[i] = ',' then
    begin
      a[j] := 1;
      a[j + 1] := 1;
      a[j + 2] := 0;
      a[j + 3] := 1;
      inc(j, 4)
    end;
        if str[i] = '[' then
    begin
      a[j] := 1;
      a[j + 1] := 1;
      a[j + 2] := 1;
      a[j + 3] := 0;
      inc(j, 4)
    end;
        if str[i] = ']' then
    begin
      a[j] := 1;
      a[j + 1] := 1;
      a[j + 2] := 1;
      a[j + 3] := 1;
      inc(j, 4);
    end;
  end;
  sum := 0;
  for i := 1 to j do
  begin
    if a[i] = 1 then
    sum := sum + step(j - i - 1) mod 1000003;
  end;
  writeln(sum mod 1000003);
end.

const
	M = 1000003;

var
	Code : array ['+'..']'] of int64;
    ans, pow : int64;
    i : longint;
    s : string;

begin

    Code['>'] := 8;
    Code['<'] := 9;
	Code['+'] := 10;
	Code['-'] := 11;
	Code['.'] := 12;
	Code[','] := 13;
	Code['['] := 14;
	Code[']'] := 15;

    readln(s);

    ans := 0;
    pow := 1;
    for i := length(s) downto 1 do
    begin
       ans := (ans+Code[s[i]]*pow) mod M;
       pow := (pow*16) mod M;
    end;

    writeln(ans);

end.

Program probb;
var s:string;
    c:array[char] of integer;
function get:longint;
var cc:char;
Begin
  if s='' then exit(0);
  cc:=s[length(s)];
  s:=copy(s,1,length(s)-1);
  exit((get()*16+c[cc]) mod 1000003);

end;
Begin
  readln(s);
  c['>']:=8;c['<']:=9;c['+']:=10;c['-']:=11;c['.']:=12;c[',']:=13;c['[']:=14;c[']']:=15;
  writeln(get);
end.

var s, b:string; i, o, k, j:longint;
begin
read(s);
o:=0;
k:=1;
b:='';
for i:=1 to length(s) do begin
if s[i]='>'  then b:=b+'1000';
if s[i]='<' then b:=b+'1001';
if s[i]='+' then b:=b+'1010';
if s[i]='-' then b:=b+'1011';
if s[i]='.' then b:=b+'1100';
if s[i]=',' then b:=b+'1101';
if s[i]='[' then b:=b+'1110';
if s[i]=']' then b:=b+'1111';
end;
for i:=length(b) downto 1 do
if b[i]='1' then begin
k:=1;
for j:=length(b) downto i+1  do
k:=(k*2) mod 1000003;
o:=(o+k) mod 1000003;
end;
write(o)
end.

{$Q-}
var t,s:ansistring;
    i,p,ans,st,o:longint;
 begin
  read(s);
  for i:=1 to length(s) do
   if s[i]='>' then t:=t+'1000'
   else
   if s[i]='<' then t:=t+'1001'
   else
   if s[i]='+' then t:=t+'1010'
   else
   if s[i]='-' then t:=t+'1011'
   else
   if s[i]='.' then t:=t+'1100'
   else
   if s[i]=',' then t:=t+'1101'
   else
   if s[i]='[' then t:=t+'1110'
   else
   if s[i]=']' then t:=t+'1111';
  st:=1;
  for i:=length(t) downto 1 do
   begin
    val(t[i],o,p);
    ans:=(ans+((o*st) mod 1000003)) mod 1000003;
    st:=(st*2) mod 1000003;
   end;
  writeln(ans);
 end.

Program B;
Var L:Longint;
    I,J,N,M:Longint;
    S:Ansistring;
    LL:Ansistring;
    Xar:Array[0..10000]Of Longint;
Begin
 Readln(S);
 Xar[0]:=1;
 For I:=1 To Length(S)*4 Do
  Xar[I]:=Xar[I-1]*2 Mod 1000003;
 For I:=1 To Length(S) Do
  Begin
   If S[I]='>' Then LL:=LL+'1000';
   If S[I]='<' Then LL:=LL+'1001';
   If S[I]='+' Then LL:=LL+'1010';
   If S[I]='-' Then LL:=LL+'1011';
   If S[I]='.' Then LL:=LL+'1100';
   If S[I]=',' Then LL:=LL+'1101';
   If S[I]='[' Then LL:=LL+'1110';
   If S[I]=']' Then LL:=LL+'1111';
  End;
 For I:=1 To Length(LL) Do
  M:=(M+(Ord(LL[I])-Ord('0'))*Xar[Length(LL)-I]) Mod 1000003;
 Writeln(M);
End.

{$APPTYPE CONSOLE}

const p=1000003;

var
 s:ansistring;
 i,k,ans,l:longint;

begin
 readln(s);
 //l:=length(s);
 ans:=0;
 for i:=1 to length(s) do
  begin
   case s[i] of
     '>': k:=8;
     '<': k:=9;
     '+': k:=10;
     '-': k:=11;
     '.': k:=12;
     ',': k:=13;
     '[': k:=14;
     ']': k:=15;
    end;
   ans:=(ans*16+k) mod p;
  end;
 writeln(ans);
end.

const
        input   =       '';
        output  =       '';
        base    =       1000003;
        token   =       '><+-.,[]';
        table   :       array[1..8] of string = ('1000','1001','1010','1011','1100','1101','1110','1111');
        maxN    =       400;

var
        fi,fo   :       text;
        s,f     :       ansistring;
        res     :       longint;
        p       :       array[0..maxN+1] of longint;

procedure openf;
begin
        assign(fi,input); reset(fi);
        assign(fo,output);rewrite(fo);
end;
//--
procedure closef;
begin
        close(fi);
        close(fo);
end;
//--
procedure readf;
begin
        readln(fi,s);
end;
//--
procedure init;
var     i : longint;
begin
        p[0]:=1;
        for i:=1 to maxN do
          p[i]:=(p[i-1]*2) mod base;
end;
//--
procedure conv;
var     i : longint;
begin
        f:='';
        for i:=1 to length(s) do
          f:=f+table[pos(s[i],token)];
end;
//--
procedure solve;
var     i : longint;
begin
        for i:=1 to length(f) do
          if f[i] = '1' then
            res:=(res+p[length(f)-i]) mod base;
end;
//--
procedure print;
begin
        writeln(fo,res);
end;
//--
begin
        openf;
        readf;
        init;
        conv;
        solve;
        print;
        closef;
end.

var
  s,ss: string;
  i,z,code: longint;
  n: int64;
function POS(a: char) : string;
begin
 if a = '>' then
  POS := '1000'
 else
  if a = '<' then
    POS := '1001'
 else
  if a = '+' then
    POS := '1010'
 else
  if a = '-' then
    POS := '1011'
 else
  if a= '.' then
    POS := '1100'
 else
   if a= ',' then
    POS := '1101'
 else
  if a='[' then
    POS :='1110'
 else
  if a=']' then
    POS := '1111';
end;
begin
  {ssign(input, 'input.txt');
  assign(output, 'output.txt');
  reset(input);
  rewrite(output);}
  readln(s);
  n := 0;
  ss := '';
  for i := 1 to length(s) do
    ss := ss + POS(s[i]);
  for i := 1 to length(ss) do
  begin
    val(ss[i],z,code);
    n := n*2+z;
    n := n mod 1000003;
  end;
  writeln(n mod 1000003);
end.

var
x,sum:ansistring;
i,pas:longint;
res : qword;
begin
sum:='';
      read (x); readln;
      for i:=1 to length(x) do
        begin
	if (x[i]='>') then sum:=sum+'1000';
	if (x[i]='<') then sum:=sum+'1001';
	if (x[i]='+') then sum:=sum+'1010';
	if (x[i]='-') then sum:=sum+'1011';
	if (x[i]='.') then sum:=sum+'1100';
	if (x[i]=',') then sum:=sum+'1101';
	if (x[i]='[') then sum:=sum+'1110';
	if (x[i]=']') then sum:=sum+'1111';
	end;

	res:=0;
	pas:=1;
	for i:=length(sum) downto 1 do
	  begin
	  if (sum[i]='1') then res:=res+pas;
	    res:=res mod 1000003;
	    pas := pas*2;
	    pas := pas mod 1000003;
	  end;
	 writeln ((res ) );
end.

  program Project2;

  uses
    SysUtils;
  {$APPTYPE CONSOLE}
  {$O-}

  var
    l,i,x:integer;
    ans,k:int64;
    s,s2:string;

procedure swap(var a,b:extended);
var
  c:extended;
begin
  c := a;
  a := b;
  b := c;
end;

begin
  //reset(input,'input.txt');
  //rewrite(output,'output.txt');
  readln(s);
  l := length(s);
  x := 0;
  s2 := '';
  for i := 1 to l do begin
    inc(x);
    if s[i] = '>' then s2 := s2 + '1000';
    if s[i] = '<' then s2 := s2 + '1001';
    if s[i] = '+' then s2 := s2 + '1010';
    if s[i] = '-' then s2 := s2 + '1011';
    if s[i] = '.' then s2 := s2 + '1100';
    if s[i] = ',' then s2 := s2 + '1101';
    if s[i] = '[' then s2 := s2 + '1110';
    if s[i] = ']' then s2 := s2 + '1111';
  end;
  k := 1;
  l := length(s2);
  ans := 0;
  for i := l downto 1 do begin
    if s2[i] = '1' then
      ans := (ans + k) mod 1000003;
    k := (k * 2) mod 1000003;
  end;
  writeln(ans);
end.

var s:string;
var t:ansistring;
var l,i,x:longint;
var h:int64;
begin
readln(s);
l:=length(s);
t:='';
for i:=1 to l do begin
  if s[i]='>' then t:=t+'1000';
  if s[i]='<' then t:=t+'1001';
  if s[i]='+' then t:=t+'1010';
  if s[i]='-' then t:=t+'1011';
  if s[i]='.' then t:=t+'1100';
  if s[i]=',' then t:=t+'1101';
  if s[i]='[' then t:=t+'1110';
  if s[i]=']' then t:=t+'1111';
end;
l:=length(t);
h:=0;
for i:=1 to l do begin
  val(t[i],x);
  h:=(h*2+x)mod 1000003;
end;
writeln(h);
end.

const
        fi='';
        fo='';
        m=1000003;
        str:array[1..8] of string=('>','<','+','-','.',',','[',']');
        dau:array[1..8] of string=('1000','1001','1010','1011','1100','1101','1110','1111');
var
        s,chuoi:ansistring;
        i,j,sum:longint;

procedure doc;
begin
        assign(input,fi);
        reset(input);
        read(s);
        close(input);
end;

procedure xuly;
begin
        for i:=1 to length(s) do
                for j:=1 to 8 do
                        if s[i]=str[j] then chuoi:=chuoi+dau[j];
        for i:=1 to length(chuoi) do sum:=(sum*2+ord(chuoi[i])-48) mod m;
end;

procedure ghi;
begin
        assign(output,fo);
        rewrite(output);
        write(sum);
        close(output);
end;

begin
        doc;
        xuly;
        ghi;
end.

{$MODE OBJFPC}
const
        fi='';
        fo='';
        modul=1000003;
var
        s: ansistring;
        i,cs: longint;
        kq: qword;

function gt(i: qword): qword;
var
        j: longint;
begin
        result:=1;
        for j:=1 to i do result:=((result mod modul) *2) mod modul;
end;

begin

        assign(input,fi); reset(input);
        assign(output,fo); rewrite(output);
        readln(s);
        cs:=-1;
        kq:=0;
        for i:=length(s) downto 1 do
        if s[i]='>' then
        begin
                kq:=(kq+gt(cs+4)) mod modul;
                cs:=cs+4;
        end
        else
        if s[i]='<' then
        begin
                kq:=(kq+gt(cs+1)) mod modul;
                kq:=(kq+gt(cs+4)) mod modul;
                cs:=cs+4;
        end
        else
        if s[i]='+' then
        begin
                kq:=(kq+gt(cs+2)) mod modul;
                kq:=(kq+gt(cs+4)) mod modul;
                cs:=cs+4;
        end
        else
        if s[i]='-' then
        begin
                kq:=(kq+gt(cs+1)) mod modul;
                kq:=(kq+gt(cs+2)) mod modul;
                kq:=(kq+gt(cs+4)) mod modul;
                cs:=cs+4;
        end
        else
        if s[i]='.' then
        begin
                kq:=(kq+gt(cs+3)) mod modul;
                kq:=(kq+gt(cs+4)) mod modul;
                cs:=cs+4;
        end
        else
        if s[i]=',' then
        begin
                kq:=(kq+gt(cs+1)) mod modul;
                kq:=(kq+gt(cs+3)) mod modul;
                kq:=(kq+gt(cs+4)) mod modul;
                cs:=cs+4;
        end
        else
        if s[i]='[' then
        begin
                kq:=(kq+gt(cs+2)) mod modul;
                kq:=(kq+gt(cs+3)) mod modul;
                kq:=(kq+gt(cs+4)) mod modul;
                cs:=cs+4;
        end
        else
        if s[i]=']' then
        begin
                kq:=(kq+gt(cs+1)) mod modul;
                kq:=(kq+gt(cs+2)) mod modul;
                kq:=(kq+gt(cs+3)) mod modul;
                kq:=(kq+gt(cs+4)) mod modul;
                cs:=cs+4;
        end;
        write(kq);

        close(input); close(output);
end.

const a='><+-.,[]';
var s:string;
    i,o:longint;
begin
  read(s);
  for i:=1to length(s)do
    o:=(o*16+7+pos(s[i],a))mod 1000003;
  write(o)
end.

program Project2;
{$APPTYPE CONSOLE}
uses  SysUtils;

var  i,j,k: integer;
     c: Char;
s: int64;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  s:=0;
  while not(Eoln) do
  begin
     read(c);
     case c of
     '>': s:=s*16+8;
     '<': s:=s*16+9;
     '+':s:=s*16+10;
     '-':s:=s*16+11;
     '.':s:=s*16+12;
     ',':s:=s*16+13;
     '[':s:=s*16+14;
     ']':s:=s*16+15;

     end;
    s:=s mod 1000003;
  end;

  Writeln(s);
end.

program A_HQ9;

{$APPTYPE CONSOLE}

uses
  SysUtils;
type myarray=array[0..10000] of longint;
const base=1000003;
var a,res : myarray;
    s,str : string;
    i,j,k : longint;
procedure pr(var a  : myarray);
var z,o : longint;
begin
 o:=a[1]*2;
 z:=1;
 a[1]:=0;
 while o>0 do
  begin
   o:=o+a[z];
   a[z]:=o mod base;
   o:=o div base;
   inc(z);
  end;
 if z-1>a[0] then a[0]:=z-1;
end;
procedure sum(var res,a : myarray);
var z,o : longint;
begin
 o:=0;
 z:=1;
 while (a[0]>=z) or (res[0]>=z) or (o>0) do
  begin
   o:=o+a[z]+res[z];
   res[z]:=o mod base;
   o:=o div base;
   inc(z);
  end;
 if z-1>res[0] then res[0]:=z-1;
end;
function ost(var res : myarray; g : longint) : longint;
var z,o : longint;
begin
 o:=0;
 for i:=res[0] downto 1 do
  begin
   o:=o*base+res[i];
   o:=o mod g;
  end;
 ost:=o;
end;
begin
 readln(s);
 str:='';
 for i:=1 to length(s) do
  begin
   case s[i] of
    '>' : str:=str+'1000';
    '<' : str:=str+'1001';
    '+' : str:=str+'1010';
    '-' : str:=str+'1011';
    '.' : str:=str+'1100';
    ',' : str:=str+'1101';
    '[' : str:=str+'1110';
    ']' : str:=str+'1111';
   end;
  end;
 for i:=1 to length(str) do
  begin
   fillchar(a,sizeof(a),0);
   if str[i]='1' then
    begin
     a[0]:=1;
     a[1]:=1;
     for j:=1 to length(str)-i do pr(a);
     sum(res,a);
    end;
 end;
 k:=ost(res,1000003);
 writeln(k);
end.

var b:boolean;
c:char;
s:string;
ans,i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do begin
if s[i]='1' then ans:=2*ans+1
else ans:=2*ans;
if ans mod 1000003 <>0 then ans:=ans mod 1000003;
end;
writeln(ans mod 1000003);
end.

{$Q-}
var s,k:ansistring;
    i:longint;
function bintodec(k:ansistring):qword;
var o,l:qword;
    p,i:integer;
begin
  o:=0;
  for i:=1 to length(k) do
    begin
      val(k[i],l,p);
      o:=(o+ (l shl (length(k)-i)) ) mod (1000000+3);
    end;
  bintodec:=o mod (1000000+3);
end;
begin
  readln(s);
  k:='';
  for i:=1 to length(s) do
    case s[i] of
      '>':k:=k+'1000';
      '<':k:=k+'1001';
      '+':k:=k+'1010';
      '-':k:=k+'1011';
      '.':k:=k+'1100';
      ',':K:=k+'1101';
      '[':k:=k+'1110';
      ']':k:=k+'1111';
    end;
  writeln(bintodec(k));
end.

{$mode objfpc}

program B;
var
  S: AnsiString;
  i, n: Integer;
  Code: Int64;

begin
  ReadLn (S);

  Code:= 0;

  for i:= 1 to Length (S) do
  begin
    case S [i] of
      '>': n:= 8;
      '<': n:= 9;
      '+': n:= 10;
      '-': n:= 11;
      '.': n:= 12;
      ',': n:= 13;
      '[': n:= 14;
      ']': n:= 14;
    end;

    Code:= (Code* 16+ n) mod 1000003;

  end;

  WriteLn (Code);
end.

var b:boolean;
c:char;
s:string;
ans,i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do begin
if s[i]='1' then ans:=ans+ans+1
else ans:=ans+ans;
if ans mod 1000003 <>0 then ans:=ans mod 1000003;
end;
writeln(ans mod 1000006);
end.

const mn=1000003;
var s,s1:ansistring;
    i:longint;
    n,x:int64;
  function bin(a,n:int64):int64;
    begin
      if n=0 then exit(1)
      else if n mod 2=0 then exit(sqr(bin(a,n div 2)))
      else exit(bin(a,n-1)*a);
    end;
  begin
    readln(s);
    for i:=1 to length(s) do
      begin
         if s[i]='>' then s1:=s1+'1000';
         if s[i]='<' then s1:=s1+'1001';
         if s[i]='+' then s1:=s1+'1010';
         if s[i]='-' then s1:=s1+'1011';
         if s[i]='.' then s1:=s1+'1100';
         if s[i]=',' then s1:=s1+'1101';
         if s[i]='[' then s1:=s1+'1110';
         if s[i]=']' then s1:=s1+'1111';
      end;
      n:=length(s1);
     for i:=1 to length(s1) do
       begin
         if s1[i]='1' then x:=(x+(bin(2,n-i))mod mn)mod mn;
       end;
       writeln(x);
  end.

{$Q-}
var s,k:ansistring;
    i:longint;
function bintodec(k:ansistring):qword;
var o,l:qword;
    p,i:integer;
begin
  o:=0;
  for i:=1 to length(k) do
    begin
      val(k[i],l,p);
      o:=(o+ (l shl (length(k)-i)) );
    end;
  bintodec:=o mod (1000000+3);
end;
begin
  readln(s);
  k:='';
  for i:=1 to length(s) do
    case s[i] of
      '>':k:=k+'1000';
      '<':k:=k+'1001';
      '+':k:=k+'1010';
      '-':k:=k+'1011';
      '.':k:=k+'1100';
      ',':K:=k+'1101';
      '[':k:=k+'1110';
      ']':k:=k+'1111';
    end;
  writeln(bintodec(k));
end.

{$MODE OBJFPC}
program B;
const
  InputFile  = '';
  OutputFile = '';
  module = 1000003;
var
  f: TextFile;
  x, s: Int64;
  st: string;
  c: char;
begin
  AssignFile(f, InputFile); Reset(f);
  s := 0;
  st := '><+-.,[]';
  while not eof(f) do
    begin
      Read(f, c);
      x := 8;
      x := x + pos(c, st) - 1;
      s := (s shl 4 + x) mod module;
    end;
  CloseFile(f);
  AssignFile(f, OutputFile); Rewrite(f);
  Write(f, s);
  CloseFile(f);
end.

{$Q-}
var s,k:ansistring;
    i:longint;
function bintodec(k:ansistring):qword;
var o,l:qword;
    p,i:integer;
begin
  o:=0;
  for i:=1 to length(k) do
    begin
      val(k[i],l,p);
      o:=(o+l shl (length(k)-i)) mod 1000003;
    end;
  bintodec:=o;
end;
begin
  readln(s);
  k:='';
  for i:=1 to length(s) do
    case s[i] of
      '>':k:=k+'1000';
      '<':k:=k+'1001';
      '+':k:=k+'1010';
      '-':k:=k+'1011';
      '.':k:=k+'1100';
      ',':K:=k+'1101';
      '[':k:=k+'1110';
      ']':k:=k+'1111';
    end;
  writeln(bintodec(k));
end.

{$MODE OBJFPC}
const H = 1000003;
var
  s, s1 : AnsiString;
  i : integer;
  sum : Int64;
procedure insert(x : Char);
begin
  if x = '>' then s1 := s1 + '1000';
  if x = '<' then s1 := s1 + '1001';
  if x = '+' then s1 := s1 + '1010';
  if x = '-' then s1 := s1 + '1011';
  if x = '.' then s1 := s1 + '1100';
  if x = ',' then s1 := s1 + '1101';
  if x = '[' then s1 := s1 + '1110';
  if x = ']' then s1 := s1 + '1111';
end;
procedure Exchange(var s1 : AnsiString);
var p : int64;
begin
  p := 1;
  for i := 1 to (length(s1) - 1) do p := p * 2;
  for i := 1 to length(s1) do
    begin
      if s1[i] = '1' then
        begin
          sum := sum + p;
          p := p div 2;
        end
      else p := p div 2;
    end;
end;
Begin
  ReadLn(s);
  for i := 1 to length(s) do insert(s[i]);
  Exchange(s1);
  WriteLn(sum mod H);
End.

const   ma=1000003;
var
        c:char;
        i,j,k:longint;

function cha:longint;
begin
        j:=0;
        case c of
        '>':j:=0; '<':j:=1; '+':j:=2;
        '-':j:=3; '.':j:=4; ',':j:=5;
        '[':j:=6; ']':j:=8;
        end;
        exit(j+8);
end;

begin
        repeat read(c); k:=(k*16+cha) mod ma; until eoln;
        writeln(k);
end.

const
 s:string=('><+-.,[]');
 a:array[1..8]of string=('1000','1001','1010','1011',
 '1100','1101','1110','1111');
var

 c:char;
 k,kk:longint;
 i,t,j:longint;
 ss:string;

function ct(a,b:longint):longint;
var
 s:longint;
begin
 s:=1;
 while b>0 do
 begin
  if odd(b) then s:=(s*a);
  a:=sqr(a);
  b:=b shr 1;
 end;
 ct:=s;
end;

begin
{ assign(input,'a.in');
 reset(input);
 assign(output,'a.out');
 rewrite(output);}
 while not eoln do
 begin
  read(c);
  ss:=ss+a[pos(c,s)];
 end;
 for i:=length(ss) downto 1 do if ss[i]='1' then
 begin
 t:=1;
 for j:=1 to length(ss)-i do t:=(t*2) mod 1000003;
 k:=(k+t) mod 1000003;
 end;
 writeln(k);
end.

var b:boolean;
c:char;
s:string;
ans:int64;
i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do begin
if s[i]='1' then ans:=2*ans+1
else ans:=2*ans;
ans:=ans mod 1000003;
end;
writeln(ans mod 1000003);
end.

var b:boolean;
c:char;
s:string;
ans,i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do begin
if s[i]='1' then ans:=2*ans+1
else ans:=2*ans;
ans:=ans mod 1000003;
end;
writeln(ans mod 1000003);
end.

uses math;
const fi='';
      fo='';
      modul=round(1e6)+3;
var f1,f2:text;
    mu:array[0..101] of longint;
    c:array[chr(1)..chr(255)] of string;
    a,s:ansistring;
procedure mo;
begin
assign(f1,fi);
reset(f1);
assign(F2,fo);
rewrite(f2);
end;

procedure dong;
begin
close(F1);
close(f2);
end;

procedure nhap;
var i,j,kq:longint;
begin
kq:=0;
    c['>']:= '1000';
    c['<']:= '1001';
    c['+']:= '1010';
    c['-']:= '1011';
    c['.']:= '1100';
    c[',']:= '1101';
    c['[']:= '1110';
    c[']']:= '1111';
mu[0]:=1;
for i:=1 to 100 do
  mu[i]:=(mu[i-1]*2) mod modul;
readln(F1,S);
for i:=1 to length(s) do
  a:=a+c[s[i]];
for i:=1 to length(a) do
  if a[i]='1' then
    kq:=(kq+mu[length(a)-i]) mod modul;
writeln(F2,kq);
end;

BEGIN
mo;
nhap;
Dong;
END.

{$Q-}
{$coperators on}
var s,k:ansistring;
    i:longint;
function reverse(s:string):string;
  var w:string;
      i:longint;
    begin
      w:='';
      for i:=length(s) downto 1 do
        w+=s[i];
      reverse:=w;
    end;
function retranslate(s:ansistring;o:byte):qword;//o-cimal to decimal
  var i,t:longint;
      p,e,k:qword;
    begin
      s:=reverse(s);
      e:=1;
      p:=0;
      For i:=0 to length(s)-1 do
        begin
          if s[i+1] in ['0'..'9'] then val(s[i+1],k,t)
          else k:=ord(s[i+1])-55;
          p+=(k*e) mod 1000003;
          e*=o mod 1000003;
        end;
      retranslate:=p mod 1000003;
    end;
begin
  readln(s);
  k:='';
  for i:=1 to length(s) do
    case s[i] of
      '>':k:=k+'1000';
      '<':k:=k+'1001';
      '+':k:=k+'1010';
      '-':k:=k+'1011';
      '.':k:=k+'1100';
      ',':K:=k+'1101';
      '[':k:=k+'1110';
      ']':k:=k+'1111';
    end;
  writeln(retranslate(k,2));
end.

var b:boolean;
c:char;
s:string;
ans,i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do
if s[i]='1' then ans:=(ans*2+1)mod 1000003
else ans:=(ans*2)mod 1000003;
write(ans);
end.

{$Q-}
var s,k:ansistring;
    i:longint;
function bintodec(k:ansistring):qword;
var o,l:qword;
    p,i:integer;
begin
  o:=0;
  for i:=1 to length(k) do
    begin
      val(k[i],l,p);
      o:=(o+ (l shl (i-1)) ) mod 1000003;
    end;
  bintodec:=o mod 1000003;
end;
begin
  readln(s);
  k:='';
  for i:=1 to length(s) do
    case s[i] of
      '>':k:='0001'+k;
      '<':k:='1001'+k;
      '+':k:='0101'+k;
      '-':k:='1101'+k;
      '.':k:='0011'+k;
      ',':K:='1011'+k;
      '[':k:='0111'+k;
      ']':k:='1111'+k;
    end;
  writeln(bintodec(k));
end.

{$Q-}
var s,k:ansistring;
    i:longint;
function bintodec(k:ansistring):qword;
var o,l:qword;
    p,i:integer;
begin
  o:=0;
  for i:=1 to length(k) do
    begin
      val(k[i],l,p);
      o:=(o+ (l shl (i-1)) );
    end;
  bintodec:=o mod 1000003;
end;
begin
  readln(s);
  k:='';
  for i:=1 to length(s) do
    case s[i] of
      '>':k:='0001'+k;
      '<':k:='1001'+k;
      '+':k:='0101'+k;
      '-':k:='1101'+k;
      '.':k:='0011'+k;
      ',':K:='1011'+k;
      '[':k:='0111'+k;
      ']':k:='1111'+k;
    end;
  writeln(bintodec(k));
end.

    var
        x:string;
        i:longint;
        sum,biner:int64;

    function p16(n:int64):int64;
    var j:longint;sum:int64;
    begin
        sum:=1;
        for j:=1 to n do
        begin
            sum:=sum*16;
        end;
        p16:=sum;
    end;

    begin
    readln(x);

    for i:=1 to length(x) do
    begin
        case x[i] of
        '>'     :    biner:=8;
        '<'       : biner:=9;
        '+'    : biner:=10;
        '-': biner:=11;
        '.': biner:=12;
        ',': biner:=13;
        '[': biner:=14;
        ']': biner:=15;
        end;

        sum:=(sum+(biner*p16(length(x)-i))) mod 1000003;
    end;
    writeln(sum);

    end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils,math,classes;

function bintohex(bin:string):string;
var i,j:integer;
str,st:string;
begin
str:='';
st:='';
j:=1;
i:=1;
while i<=length(bin)do
begin
str:=str+bin[i];
if (j=4) then
begin

    //hex tetrads---------------------------------------------
    if (str='0000') then st:=st+'0';
    if (str='0001') then st:=st+'1';
    if (str='0010') then st:=st+'2';
    if (str='0011') then st:=st+'3';
    if (str='0100') then st:=st+'4';
    if (str='0101') then st:=st+'5';
    if (str='0110') then st:=st+'6';
    if (str='0111') then st:=st+'7';
    if (str='1000') then st:=st+'8';
    if (str='1001') then st:=st+'9';
    if (str='1010') then st:=st+'A';
    if (str='1011') then st:=st+'B';
    if (str='1100') then st:=st+'C';
    if (str='1101') then st:=st+'D';
    if (str='1110') then st:=st+'E';
    if (str='1111') then st:=st+'F';
   // writeln(str);
    str:='';
    j:=0;
    //hex tetrads---------------------------------------------
end;
j:=j+1;
i:=i+1;
end;
bintohex:=st;
end;
{
function HexToDec(const HexStr: string): integer;
var v, i: integer;
begin
Result := 0;
for i := 1 to Length(HexStr) do
begin
if HexStr in ['0'..'9'] then v := Ord(HexStr) - Ord(?0?) else
if UpCase(HexStr) in ['A'..'F'] then
v := ord(UpCase(HexStr)) - Ord(?A?) - 10 else
begin
Result := 0;
exit;
end;
Result := Result + v * Round(Power(16, Length(HexStr) - i));
end;
end;
{
function hextodec(hex:string):extended;
var st,st1:string;
i,k:integer;
j:extended;
begin
j:=0;
result:=0;
k:=length(hex);
for i:=0 to length(hex)-1 do
begin
st1:=hex[k];
if st1='A' then st1:='10';
if st1='B' then st1:='11';
if st1='C' then st1:='12';
if st1='D' then st1:='13';
if st1='E' then st1:='14';
if st1='F' then st1:='15';
j:=j+(strtoint(st1)*power(16,i));
//writeln(st1);
k:=k-1;
//writeln(power(16,i):4:2);
end;
hextodec:=j;
end;
 }

var i,k:integer;
c:int64;
s,s1,res,res2:string;
mess:boolean;
begin

 c:=0;
  //readln(s);
  s:='++++[>,.<-]';
  s1:=s;
  res:='';
  for i := 1 to length(s) do
    begin
      if (s1[i]='>') then
      res:=res+'1000';
      if (s1[i]='<') then
       res:=res+'1001';
       if (s1[i]='+') then
       res:=res+'1010';
       if (s1[i]='-') then
       res:=res+'1011';
       if (s1[i]='.') then
       res:=res+'1100';
       if (s1[i]=',') then
       res:=res+'1101';
       if (s1[i]='[') then
       res:=res+'1110';
       if (s1[i]=']') then
       res:=res+'1111';
end;
res:=(bintohex(res));
c:= StrToInt64('$'+ res);
c:=c mod 1000003;
writeln(c);
readln;
  { TODO -oUser -cConsole Main : Insert code here }
end.

program unary;
{$APPTYPE CONSOLE}
{$o-}
uses
  SysUtils;

var
  fin,fout:text;
  s:int64;
  st:string;
  i:longint;
function deg(x:integer):int64;
var
  k:longint;
  p:int64;
begin
  p:=1;
  for k:=1 to x do
    p:=p*2;
  deg:=p;
end;

begin
  assign(fin,'');  assign(fout,'');
  reset(fin); rewrite(fout);
  readln(fin,st);
  s:=0;
  for i:=length(st)-1 downto 0 do
    begin
      if st[i+1]='>' then
        s:=s mod 1000003+(deg((length(st)-1-i)*4)*8) mod 1000003;
      if st[i+1]='<' then
        s:=s mod 1000003+(deg((length(st)-1-i)*4)*9) mod 1000003;
      if st[i+1]='+' then
        s:=s mod 1000003+(deg((length(st)-1-i)*4)*10) mod 1000003;
      if st[i+1]='-' then
        s:=s mod 1000003+(deg((length(st)-1-i)*4)*11) mod 1000003;
      if st[i+1]='.' then
        s:=s mod 1000003+(deg((length(st)-1-i)*4)*12) mod 1000003;
      if st[i+1]=',' then
        s:=s mod 1000003+(deg((length(st)-1-i)*4)*13) mod 1000003;
      if st[i+1]='[' then
        s:=s mod 1000003+(deg((length(st)-1-i)*4)*14) mod 1000003;
      if st[i+1]=']' then
        s:=s mod 1000003+(deg((length(st)-1-i)*4)*15) mod 1000003;
    end;
  writeln(fout,s mod 1000003);
  close(fin); close(fout);
end.

var sl:string;
    i,j,k:longint;
    x,y,z,os,otv:int64;
function stp(ii:int64):int64;
var j1,j2:int64;
begin
  if ii=0 then stp:=1
   else
     if (ii mod 2)=0 then begin j1:=stp(ii div 2); stp:=j1*j1; end
       else stp:=stp(ii-1)*2;
end;
begin
os:=1000003;
{assign(output,'output.txt'); rewrite(output);
assign(input,'input.txt'); reset(input);    }
read(sl);
k:=length(sl);
otv:=0;
for i:=1 to k do
begin
  if sl[i]='>' then
      begin
        x:=stp(4*(k+1-i)-1);
        otv:=(otv+x) mod os;
      end;
      if sl[i]='<' then
      begin
        x:=stp(4*(k+1-i)-1);
        otv:=(otv+x) mod os;
        otv:=(otv+(x div 8)) mod os;
      end;
    if sl[i]='+' then
      begin
        x:=stp(4*(k+1-i)-1);
        otv:=(otv+x) mod os;
        otv:=(otv+x div 4) mod os;
      end;
if sl[i]='-' then
      begin
        x:=stp(4*(k+1-i)-1);
        otv:=(otv+x) mod os;
        otv:=(otv+x div 8) mod os;
        otv:=(otv+x div 4) mod os;
      end;
if sl[i]='.' then
      begin
        x:=stp(4*(k+1-i)-1);
        otv:=(otv+x) mod os;
        otv:=(otv+x div 2) mod os;
      end;
if sl[i]=',' then
      begin
        x:=stp(4*(k+1-i)-1);
        otv:=(otv+x) mod os;
        otv:=(otv+x div 2) mod os;
        otv:=(otv+x div 8) mod os;
      end;
if sl[i]='[' then
      begin
        x:=stp(4*(k+1-i)-1);
        otv:=(otv+x) mod os;
        otv:=(otv+x div 2) mod os;
        otv:=(otv+x div 4) mod os;
      end;
if sl[i]=']' then
      begin
        x:=stp(4*(k+1-i)-1);
        otv:=(otv+x) mod os;
        otv:=(otv+x div 2) mod os;
        otv:=(otv+x div 4) mod os;
        otv:=(otv+x div 8) mod os;
      end;
end;
write(otv);
end.

var s,s1:ansistring;
    i,p:longint;
function BIN_DEC(x:string):longint;
const digits:array [0..1] of char = ('0','1');
var res,ves:longint; i,j:byte;
begin
   res:=0; ves:=1;
   for i:=length(x) downto 1 do begin
      j:=0;
      while (digits[j]<>x[i]) do inc(j);
      res:=res+ves*j;
      ves:=ves*2;
   end;
   BIN_DEC:=res;
end;
 begin
  readln(s);
  for i:=1 to length(s) do
   if s[i]='>' then s1:=s1+'1000'
   else if s[i]='<' then s1:=s1+'1001'
   else if s[i]='+' then s1:=s1+'1010'
   else if s[i]='-' then s1:=s1+'1011'
   else if s[i]='.' then s1:=s1+'1100'
   else if s[i]=',' then s1:=s1+'1101'
   else if s[i]='[' then s1:=s1+'1110'
   else if s[i]=']' then s1:=s1+'1111';
  writeln(BIN_DEC(s1));
 end.

 var
        x,biner:string;
        i,temp:longint;
        binary:int64;

    function pangkat(n:longint):int64;
    var i:longint; sum:int64;
    begin
        sum:=1;
        for i:=1 to n do
        begin
            sum:=sum*2;
        end;
        pangkat:=sum;
    end;

    begin
    readln(x);
    for i:=1 to length(x) do
    begin
        case x[i] of
        '>'    : biner:=biner+'1000';
        '<'    : biner:=biner+'1001';
        '+'    : biner:=biner+'1010';
        '-'    : biner:=biner+'1011';
        '.'    : biner:=biner+'1100';
        ','    : biner:=biner+'1101';
        '['    : biner:=biner+'1110';
        ']'    : biner:=biner+'1111';
        end;
    end;

    for i:=length(biner) downto 1 do
    begin
        val(biner[i],temp);
        binary:=binary + (temp * pangkat(length(biner)-i));
    end;

    writeln(binary mod 1000003);

    end.

program Project23;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
i,p,k:integer;
a,b,c,d:string;

function bin2dec(s:string):int64;
 var x,j:integer;
 begin
   x:=0;
   for j:=1 to length(s) do
   begin
      x:=x+ord(s[j])-ord('0');
      if j<length(s) then x:=x*2;
   end;
 bin2dec:=x;
 end;

begin
  { TODO -oUser -cConsole Main : Insert code here }
readln(a);
for i:=1 to length(a) do
case a[i] of
 '>':b:=b+'1000';
 '<':b:=b+'1001';
 '+':b:=b+'1010';
 '-':b:=b+'1011';
 '.':b:=b+'1100';
 ',':b:=b+'1101';
 '[':b:=b+'1110';
 ']':b:=b+'1111';
  end;
p:=0;
k:=0;
while length(b)>20 do
delete(b,1,1);

writeln(bin2dec(b) mod 1000003);
end.

const   ma=1000003;
var
        c:char;
        i,j,k:longint;

function cha:longint;
begin
        j:=0;
        case c of
        '>':j:=0; '<':j:=1; '+':j:=2;
        '-':j:=3; '.':j:=4; ',':j:=5;
        '[':j:=6; ']':j:=8;
        end;
        exit(j+8);
end;

begin
        repeat read(c); k:=(k*16+cha) mod ma; until eoln;
        writeln(k);
end.

var b:boolean;
c:char;
s:string;
ans,i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do begin
if s[i]='1' then ans:=(ans*2+1)
else ans:=(ans*2);
//ans:=ans mod 1000003;
end;
write(ans mod 1000003);
end.

{$mode objfpc}

program B;
var
  S: AnsiString;
  i, n: Integer;
  Code: Int64;

begin
  ReadLn (S);

  Code:= 0;

  for i:= 1 to Length (S) do
  begin
    case S [i] of
      '>': n:= 8;
      '<': n:= 9;
      '+': n:= 10;
      '-': n:= 11;
      '.': n:= 12;
      ',': n:= 13;
      '[': n:= 14;
      ']': n:= 14;
    end;

    Code:= (Code* 16+ n) mod 1000003;

  end;

  WriteLn (Code);
end.

program codeforces;

{$APPTYPE CONSOLE}{$O-}

uses
  SysUtils;
var
  s: string;
  c: char;

function BIN_DEC(x:string):longint;
const digits:array [0..1] of char = ('0','1');
var res,ves:longint; i,j:byte;
begin
   res:=0; ves:=1;
   for i:=length(x) downto 1 do begin
      j:=0;
      while (digits[j]<>x[i]) do inc(j);
      res:=(res+ves*j);
      ves:=ves*2 mod 1000003;
   end;
   BIN_DEC:=res;
end;
begin
  while not eoln do
  begin
    read(c);
    case c of
      '>':
        s := s + '1000';
      '<':
        s := s + '1001';
      '+':
        s := s +   '1010';
      '-':
        s := s +   '1011';
      '.':
        s := s +   '1100';
      ',':
        s := s +   '1101';
      '[':
        s := s +   '1110';
      ']':
        s := s +   '1111';
    end;
  end;
  write(BIN_DEC(s));
end.

program Project4;
{$APPTYPE CONSOLE}

var i,j: integer;
    c: char;
    s: string;
    n,m: int64;
begin
  s := '';
  while not eof do
    begin
      read(c);
      case c of
        '>': s := s + '1000';
        '<': s := s + '1001';
        '+': s := s + '1010';
        '-': s := s + '1011';
        '.': s := s + '1100';
        ',': s := s + '1101';
        '[': s := s + '1110';
        ']': s := s + '1111';
      end;
    end;
  n := 0;
  for i := 1 to length(s) do
    if s[i] = '1' then
      begin
      j := length(s)-i;
      m := 2;
      if j = 0 then m := 1;
      while j-1 > 0 do
        begin
          m := 2 * m;
          DEC(j);
        end;
      n := n + m;
      end;
  write(n MOD 1000003);
end.

var
    x:string;
    i:longint;
    sum,biner:int64;

function p16(n:int64):int64;
var j:longint;sum:int64;
begin
    sum:=1;
    for j:=1 to n do
    begin
        sum:=sum*16;
    end;
    p16:=sum;
end;

begin
readln(x);

for i:=1 to length(x) do
begin
    case x[i] of
    '>'     :    biner:=8;
    '<'       : biner:=9;
    '+'    : biner:=10;
    '-': biner:=11;
    '.': biner:=12;
    ',': biner:=13;
    '[': biner:=14;
    ']': biner:=15;
    end;

    sum:=sum+(biner*p16(length(x)-i));
end;
writeln(sum mod 1000003);

end.

    var
        x,biner:string;
        i,temp:int64;
        binary:int64;

    function pangkat(n:longint):int64;
    var i:longint; sum:int64;
    begin
        sum:=1;
        for i:=1 to n do
        begin
            sum:=sum*2;
        end;
        pangkat:=sum;
    end;

    begin
    readln(x);
    i:=1;
    while i<=length(x) do
    begin
        case x[i] of
        '>'    : biner:=biner+'1000';
        '<'    : biner:=biner+'1001';
        '+'    : biner:=biner+'1010';
        '-'    : biner:=biner+'1011';
        '.'    : biner:=biner+'1100';
        ','    : biner:=biner+'1101';
        '['    : biner:=biner+'1110';
        ']'    : biner:=biner+'1111';
        end;

        inc(i);
    end;

    i:=length(biner);
    while i>=1 do
    begin
        val(biner[i],temp);
        binary:=binary + (temp * pangkat(length(biner)-i));
        dec(i);
    end;

    writeln(binary mod 1000003);

    end.

var b:boolean;
c:char;
s:string;
ans:int64;
i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do begin
if s[i]='1' then ans:=2*ans+1
else ans:=2*ans;
ans:=ans mod 1000003;
end;
writeln(ans mod 1000003);
end.

{$r-, s-, q-, i-, o+}
const
  base = round(1e6) + 3;
var
  s, t : ansistring;
  n, i, j, p, ans : longint;
  brainfuck, unary : array [0..200] of ansistring;
begin
  readln(s);
  n := length(s);
  for i := 1 to n do
    for j := 1 to 8 do
      if (s[i] = brainfuck[j]) then
        t := t + unary[j];
  n := length(t);
  p := 1;
  for i := n downto 1 do
    begin
      ans := (ans + (ord(t[i]) - ord('0')) * p) mod base;
      p := (p + p) mod base;
    end;
  writeln(ans);
end.

var l,i,j: integer;
s,st:string;
a,b:int64;
begin
  read(s);
  l:=(length(s)*4)-1;
  a:=0;
  for i:=1 to length(s) do
  begin
    if s[i]='>' then st:='1000';
    if s[i]='<' then st:='1001';
    if s[i]='+' then st:='1010';
    if s[i]='-' then st:='1011';
    if s[i]='.' then st:='1100';
    if s[i]=',' then st:='1101';
    if s[i]='[' then st:='1110';
    if s[i]=']' then st:='1111';
    b:=1;
    if st[1]='1' then
   for j:=1 to l do
     begin
      b:=b*2;
     end else b:=0;
     l:=l-1;
     a:=a+b;
     a:=a mod 1000003;
    b:=1;
    if st[2]='1' then
   for j:=1 to l do
     begin
      b:=b*2;
     end else b:=0;
     l:=l-1;
     a:=a+b;
     a:=a mod 1000003;
    b:=1;
    if st[3]='1' then
   for j:=1 to l do
     begin
      b:=b*2;
     end else b:=0;
     l:=l-1;
     a:=a+b;
     a:=a mod 1000003;
    b:=1;
    if st[4]='1' then
   for j:=1 to l do
     begin
      b:=b*2;
     end else b:=0;
     l:=l-1;
     a:=a+b;
     a:=a mod 1000003;
  end;
  write(a);
end.

var b:boolean;
c:char;
s:string;
ans,i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do begin
if s[i]='1' then ans:=(ans*2+1)
else ans:=(ans*2);
ans:=ans mod 1000003;
end;
write(ans);
end.

var b:boolean;
c:char;
s:string;
ans,i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do begin
if s[i]='1' then ans:=2*ans+1
else ans:=2*ans;
if ans mod 1000003 <>0 then ans:=ans mod 1000003;
end;
writeln(ans mod 1000003);
end.

program Project1;

{$APPTYPE CONSOLE}
function step(i : longint): int64;
var
   j: longint;
   q : int64;
begin
  q := 1;
  for j:= 1 to i do
    q := q * 2;
  step := q;
end;
var
   str: string;
   j, sum: int64;
   i: longint;
   a: array[1..400] of longint;
begin
 // reset(input, 'input.txt');
 // rewrite(output, 'output.txt');
  readln(str);
  j := 1;
  for i := 1 to length(str) do
  begin
    if str[i] = '>' then
    begin
      a[j] := 1;
      a[j + 1] := 0;
      a[j + 2] := 0;
      a[j + 3] := 0;
      inc(j, 4)
    end;
        if str[i] = '<' then
    begin
      a[j] := 1;
      a[j + 1] := 0;
      a[j + 2] := 0;
      a[j + 3] := 1;
      inc(j, 4)
    end;
        if str[i] = '+' then
    begin
      a[j] := 1;
      a[j + 1] := 0;
      a[j + 2] := 1;
      a[j + 3] := 0;
      inc(j, 4)
    end;
        if str[i] = '-' then
    begin
      a[j] := 1;
      a[j + 1] := 0;
      a[j + 2] := 1;
      a[j + 3] := 1;
      inc(j, 4)
    end;
        if str[i] = '.' then
    begin
      a[j] := 1;
      a[j + 1] := 1;
      a[j + 2] := 0;
      a[j + 3] := 0;
      inc(j, 4)
    end;
    if str[i] = ',' then
    begin
      a[j] := 1;
      a[j + 1] := 1;
      a[j + 2] := 0;
      a[j + 3] := 1;
      inc(j, 4)
    end;
        if str[i] = '[' then
    begin
      a[j] := 1;
      a[j + 1] := 1;
      a[j + 2] := 1;
      a[j + 3] := 0;
      inc(j, 4)
    end;
        if str[i] = ']' then
    begin
      a[j] := 1;
      a[j + 1] := 1;
      a[j + 2] := 1;
      a[j + 3] := 1;
      inc(j, 4);
    end;
  end;
  sum := 0;
  for i := 1 to j do
  begin
    if a[i] = 1 then
    sum := sum + step(j - i - 1);
  end;
  writeln(sum mod 1000003);
end.

var s,st: ansistring;
a,b:int64;
i,j:longint;
begin
  read(s);
  a:=0;
  st:='';
  for i:=1 to length(s) do
  begin
    if s[i]='>' then st:=st+'1000';
    if s[i]='<' then st:=st+'1001';
    if s[i]='+' then st:=st+'1010';
    if s[i]='-' then st:=st+'1011';
    if s[i]='.' then st:=st+'1100';
    if s[i]=',' then st:=st+'1101';
    if s[i]='[' then st:=st+'1110';
    if s[i]=']' then st:=st+'1111';
    end;
    for i:=1 to length(st) do
    begin
    b:=1;
    if st[i]='1' then
   for j:=1 to length(st)-i do
     begin
      b:=b*2;
     end else b:=0;
     a:=a+b;
     a:=a mod 1000003;
  end;
  write(a);
end.

program codeforces;

{$APPTYPE CONSOLE}{$O-}

uses
  SysUtils;
var
  s: string;
  c: char;

function BIN_DEC(x:string):longint;
const digits:array [0..1] of char = ('0','1');
var res,ves:longint; i,j:byte;
begin
   res:=0; ves:=1;
   for i:=length(x) downto 1 do begin
      j:=0;
      while (digits[j]<>x[i]) do inc(j);
      res:=(res+ves*j) mod 1000003;
      ves:=ves*2;
   end;
   BIN_DEC:=res;
end;
begin
  while not eoln do
  begin
    read(c);
    case c of
      '>':
        s := s + '1000';
      '<':
        s := s + '1001';
      '+':
        s := s +   '1010';
      '-':
        s := s +   '1011';
      '.':
        s := s +   '1100';
      ',':
        s := s +   '1101';
      '[':
        s := s +   '1110';
      ']':
        s := s +   '1111';
    end;
  end;
  write(BIN_DEC(s));
end.

var
  s,ss: string;
  i,z,code: longint;
  n: int64;
function POS(a: char) : string;
begin
 if a = '>' then
  POS := '1000'
 else
  if a = '<' then
    POS := '1001'
 else
  if a = '+' then
    POS := '1010'
 else
  if a = '-' then
    POS := '1011'
 else
  if a= '.' then
    POS := '1100'
 else
   if a= ',' then
    POS := '1101'
 else
  if a='[' then
    POS :='1110'
 else
  if a=']' then
    POS := '1111';
end;
begin
  {assign(input, 'input.txt');
  assign(output, 'output.txt');
  reset(input);
  rewrite(output);}
  readln(s);
  n := 0;
  ss := '';
  for i := 1 to length(s) do
    ss := ss + POS(s[i]);
  for i := 1 to length(ss) do
  begin
    val(ss[i],z,code);
    n := n*2+z;
  end;
  writeln(n mod 1000003);
end.

    var
            x,biner:string;
            i,temp:int64;
            binary:int64;

        function pangkat(n:int64):int64;
        var i:int64; sum:int64;
        begin
            sum:=1; i:=1;
            while i<=n do
            begin
                sum:=sum*2;
                inc(i);
            end;
            pangkat:=sum;
        end;

        begin
        readln(x);
        i:=1;
        while i<=length(x) do
        begin
            case x[i] of
            '>'    : biner:=biner+'1000';
            '<'    : biner:=biner+'1001';
            '+'    : biner:=biner+'1010';
            '-'    : biner:=biner+'1011';
            '.'    : biner:=biner+'1100';
            ','    : biner:=biner+'1101';
            '['    : biner:=biner+'1110';
            ']'    : biner:=biner+'1111';
            end;

            inc(i);
        end;

        i:=length(biner);
        while i>=1 do
        begin
            val(biner[i],temp);
            binary:=binary + (temp * pangkat(length(biner)-i));
            dec(i);
        end;

        writeln(binary mod 1000003);

        end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
 n,i,sum,j,x,z,f,f1,se,se1:integer;
 s,k,p:string;

 function per(k:string):int64;
   var
   i:integer;
   r:int64;
   begin
     r:=0;
     for i:=1 to length(k) do
     if k[i]='0' then r:=(r mod 1000003)*2
     else  r:=(r mod 1000003)*2+1;
   per:=r;
   end;

  begin
 readln(s);
 for i:=1 to length(s) do
  begin
   if s[i]='>' then k:='1000';
   if s[i]='<' then k:='1001';
   if s[i]='[' then k:='1110';
   if s[i]=']' then k:='1111';
   if s[i]='+' then k:='1010';
   if s[i]='-' then k:='1011';
   if s[i]='.' then k:='1100';
   if s[i]=',' then k:='1101';
  p:=p+k;
  end;
  writeln(per(p));

end.

  begin
 readln(s);
 for i:=1 to length(s) do
  begin
   if s[i]='>' then k:='1000';
   if s[i]='<' then k:='1001';
   if s[i]='[' then k:='1110';
   if s[i]=']' then k:='1111';
   if s[i]='+' then k:='1010';
   if s[i]='-' then k:='1011';
   if s[i]='.' then k:='1100';
   if s[i]=',' then k:='1101';
  p:=p+k;
  end;
  writeln(per(p) mod 1000003);

end.

{$mode objfpc}

program B;
var
  S: AnsiString;
  i, n: Integer;
  Code: Int64;

begin
  ReadLn (S);

  Code:= 0;

  for i:= 1 to Length (S) do
  begin
    case S [i] of
      '>': n:= 8;
      '<': n:= 9;
      '+': n:= 10;
      '-': n:= 11;
      '.': n:= 12;
      ',': n:= 13;
      '[': n:= 14;
      ']': n:= 14;
    end;

    Code:= (Code* 16+ n) mod 1000003;

  end;

  WriteLn (Code);
end.

uses math;
const fi='';
      fo='';
      modul=round(1e6)+3;
var f1,f2:text;
    mu:array[0..401] of longint;
    c:array[chr(1)..chr(255)] of string;
    a,s:ansistring;
procedure mo;
begin
assign(f1,fi);
reset(f1);
assign(F2,fo);
rewrite(f2);
end;

procedure dong;
begin
close(F1);
close(f2);
end;

procedure nhap;
var i,j:longint;
    kq:int64;
begin
kq:=0;
    c['>']:= '1000';
    c['<']:= '1001';
    c['+']:= '1010';
    c['-']:= '1011';
    c['.']:= '1100';
    c[',']:= '1101';
    c['[']:= '1110';
    c[']']:= '1111';
mu[0]:=1;
a:='';
for i:=1 to 100 do
  mu[i]:=(mu[i-1]*2) mod modul;
readln(F1,S);
for i:=1 to length(s) do
  a:=a+c[s[i]];
for i:=1 to length(a) do
  if a[i]='1' then
    kq:=(kq+mu[length(a)-i]) mod modul;
writeln(F2,kq);
end;

BEGIN
mo;
nhap;
Dong;
END.

var
        c: char;
        s: ansistring;
        res,i: longint;
begin
        while not eoln do
        begin
                read(c);
                if c='>' then s:=s+'1000';
                if c='<' then s:=s+'1001';
                if c='+' then s:=s+'1010';
                if c='-' then s:=s+'1011';
                if c='.' then s:=s+'1100';
                if c=',' then s:=s+'1101';
                if c='[' then s:=s+'1110';
                if c=']' then s:=s+'1111';
        end;
        for i:=1 downto length(s) do
        begin
                res:=(res*2+ord(s[i])-48) mod 1000003;

        end;
        writeln(res);
end.

program pr1;

{$APPTYPE CONSOLE}

const nn=1001;
 eps=0.000000001;  nnn=200;
 label 1,2;
var step,i,j:longint;
n,ot,modul,p1,p2,k,s,besk,l,r,izm,t,p:longint;
a,b:array [0..1000000] of longint;
sv:array [-1..100,-1..100 ] of boolean;
uu,uu1:array[0..200] of boolean;
flag2,flag1,flag:boolean;
verot:double;
pr:array[-1..1000000] of boolean;
ss,namemin:string;
str:array[0..20] of string;
function min (a,b:longint):longint;begin min:=b;if a<b then min:=a;  end;
function max (a,b:longint):longint;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:longint):longint; var p,t:longint;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

function nod1(a,b:longint):longint; var k,p,t:longint;
begin k:=-1;
if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;   k:=k+a div b;
   a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod1:=k;
end;

{function diam(a,b:mas;n:longint):longint;
var i0,t,i,j,k:longint; kver:mas; sv:mas2;
 begin
   for i:=1 to n do for j:=1 to n-1 do
   if a[j]=i then  begin  inc(kver[i]); sv[i,kver[i]]:=b[j];  end;
 for i:=1 to n do for j:=1 to n-1 do
   if b[j]=i then  begin  inc(kver[i]); sv[i,kver[i]]:=a[j];  end;
 for i:=1 to n do write(kver[i],' ');writeln;  writeln;
 for i:=1 to n do begin  for j:=1 to kver[i] do write(i,'-',sv[i,j],'    ');writeln;  end;

for i0:=1 to 1 do
  begin  for i:=1 to n do sm[i]:=false; for i:=1 to n do dist[i]:=1000;
  sm[i0]:=true; dist[i0]:=0; kol:=1;

  end;

diam:=t;
 end; }
  function per(a:char):longint;
 begin
     if a='>' then per:=8;
     if a='<' then per:=9;
     if a='+' then per:=10;
     if a='-' then per:=11;
     if a='.' then per:=12;
     if a=',' then per:=13;
     if a='[' then per:=14;
     if a=']' then per:=15;
 end;

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}  read(ss); n:=length(ss);
 ot:=0;  for i:=1 to n do ot:=16*ot+per(ss[i]) mod 1000003;
                      writeln(ot);

   1:      close(output);
end.

var b:boolean;
c:char;
s:string;
ans,i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do begin
if s[i]='1' then ans:=ans+ans+1
else ans:=ans+ans;
ans:=ans mod 1000003;
end;
writeln(ans);
end.

program calendar;
{$APPTYPE CONSOLE}
uses
  SysUtils;

var  a: array [char] of integer;
     s: string;
     p,i,o,j:integer;
begin
a['>']:=8;
a['<']:=9;
a['+']:=10;
a['-']:=11;
a['.']:=12;
a[',']:=13;
a['[']:=14;
a[']']:=15;
p:=1; o:=0;
readln(s);
for i:= length(s) downto 1 do
 begin
 o:=o+(p*a[s[i]]) mod 1000003;
 p:=(p*16) mod 1000003;
 end;
write(o);

read(i);
end.

{$Q-}
var s,k:ansistring;
    i:longint;
function bintodec(k:ansistring):qword;
var o,l:qword;
    p,i:integer;
begin
  o:=0;
  for i:=1 to length(k) do
    begin
      val(k[i],l,p);
      o:=(o+ (l shl (i-1)) );
    end;
  bintodec:=o mod 1000003;
end;
begin
  readln(s);
  k:='';
  for i:=1 to length(s) do
    case s[i] of
      '>':k:='0001'+k;
      '<':k:='1001'+k;
      '+':k:='0101'+k;
      '-':k:='1101'+k;
      '.':k:='0011'+k;
      ',':K:='1011'+k;
      '[':k:='0111'+k;
      ']':k:='1111'+k;
    end;
  writeln(bintodec(k));
end.

{$Q-}
var s,k:ansistring;
    i:longint;
function bintodec(k:ansistring):qword;
var o,l:qword;
    p,i:integer;
begin
  o:=0;
  for i:=1 to length(k) do
    begin
      val(k[i],l,p);
      o:=(o+l shl (length(k)-i)) mod 1000003;
    end;
  bintodec:=o mod 1000006;
end;
begin
  readln(s);
  k:='';
  for i:=1 to length(s) do
    case s[i] of
      '>':k:=k+'1000';
      '<':k:=k+'1001';
      '+':k:=k+'1010';
      '-':k:=k+'1011';
      '.':k:=k+'1100';
      ',':K:=k+'1101';
      '[':k:=k+'1110';
      ']':k:=k+'1111';
    end;
  writeln(bintodec(k));
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  i: integer;
  n: int64;
  s, t: string;
  a: array[-1..10000] of int64;

begin
{  reset(input, 'input.txt');
  rewrite(output, 'output.txt');}

  readln(s);

  a[0] := 1;
  for i := 1 to 101 do
    a[i] := (a[i - 1] * 2) mod 1000003;

  t := '';
  for i := 1 to length(s) do begin
    case s[i] of
      '>': t := t + '1000';
      '<': t := t + '1001';
      '+': t := t + '1010';
      '-': t := t + '1011';
      '.': t := t + '1100';
      ',': t := t + '1101';
      '[': t := t + '1110';
      ']': t := t + '1111';
    end;
  end;

  n := 0;
  for i := 1 to length(t) do begin
    if (t[i] = '1') then
      n := (n + a[length(t) - i]) mod 1000003;
  end;

  writeln(n);
end.

var b:boolean;
c:char;
s:string;
ans:int64;
i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=2 to length(s) do begin
if s[i]='1' then ans:=2*ans+1
else ans:=2*ans;
ans:=ans mod 1000003;
end;
writeln(ans mod 1000003);
end.

var b:boolean;
c:char;
s:string;
ans,i:longint;
begin
b:=false;
s:='';
while not eoln do begin
read(c);
if (c='>') then s:=s+'1000';
if (c='<') then s:=s+'1001';
if (c='+') then s:=s+'1010';
if (c='-') then s:=s+'1011';
if (c='.') then s:=s+'1100';
if (c=',') then s:=s+'1101';
if (c='[') then s:=s+'1110';
if (c=']') then s:=s+'1111';
end;
ans:=1;
for i:=length(s) downto 2 do
if s[i]='1' then ans:=(ans*2+1)mod 1000003
else ans:=(ans*2)mod 1000003;
write(ans);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  list=array[1..1000000]of integer;
var
  i:Integer;
  s,s1:string;
function lol(s:string):Int64;
var
  k,i,j,n,code:Integer;
  g,a:Int64;
begin
  k:=0;
  g:=0;
  a:=0;
  n:=Length(s)-1;
  for i:=1 to Length(s) do
    begin
      if (s[i]='0') then g:=g*2
        else g:=g*2+1;
    end;
  lol:=g;
end;
begin
  Readln(s);
  s1:='';
  for i:=1 to Length(s) do
    begin
      if (s[i]='>') then s1:=s1+'1000';
      if (s[i]='<') then s1:=s1+'1001';
      if (s[i]='+') then s1:=s1+'1010';
      if (s[i]='-') then s1:=s1+'1011';
      if (s[i]='.') then s1:=s1+'1100';
      if (s[i]=',') then s1:=s1+'1101';
      if (s[i]='[') then s1:=s1+'1110';
      if (s[i]=']') then s1:=s1+'1111';
    end;
  Writeln(lol(s1)mod 1000003);
  Readln;
  Readln;
end.