<>;$/=$";map{$%=$-if($-=$p-$_)&&!$%|$%>$-;$p=$_}sort{$b-$a}<>;print$%