<>;$\+=abs$_-$_[@_/2]for@_=`tr ' ' '\\n'|sort -n`;print