<>;<>;print+(@_=sort{$b-$a}<>)[0]-$_[-1]