NR>1{N=split($0,a);
	for(i in a){
    	t[a[i]]++;
    }
    sum = flg = 0
    for(i in t){
    	if(flg==0){
        	ans -= i;
            flg++;
        }
        ans += i - before;
        before = i;
    }
    print ans
}