#include using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); long long int L = 0; long long int R = 0; int n; long long int t; cin >> n; for(int i=0;i> t; if(t < 0) L = max(L,-t); else R = max(R,t); } cout << 2*(L+R) << '\n'; return 0; }