main=map read.words<$>getLine>>=print.f
 where f x|(length(filter odd x))==2 =g [y+(if(odd y)then 1 else 0)|y<-x] 1
          |(length(filter odd x))==1 =g [y+(if(odd y)then 0 else 1)|y<-x] 1
          |otherwise                 =g x 0
       g x b =b+sum[quot((maximum x)-y)2|y<-x]