int c[1d5];
{
	int@n;
	rd(c(n));
	sortF(n,c);
	ll e=0,f=0;
	rep(i,n){
		e+=c[i];
		f=c[i]-f;
	}
	e=abs(e);
	f=abs(f);
	wt(e<f?e:f);
}