#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n>>m; vector d(m); for(Int i=0;i>d[i]; sort(d.begin(),d.end()); Int ans=1e9; for(Int i=n-1;i=0) chmin(ans,max(abs(d[i]),abs(d[j]))); else chmin(ans,abs(d[i])+abs(d[j])+min(abs(d[i]),abs(d[j]))); } cout<