S=list(input()) i=0 while i1: St=len(Co) if len(Co)%2==1: St-=1 Nw=0 while St>1: Nw+=Co[St-1] Sc+=Nw*Co[St-2] St-=2 print (Sc)