#include <bits/stdc++.h>
using namespace std;
int n, x, a[10000001],c[10000001],d;
int main() {
    cin >> n >> x;
    for( int i=1; i<=n; i++){
        cin >> a[i];
        if( x>=0)
          if( a[i]>=0)
            c[i]=abs(x-a[i]);
             else if( a[i]<0)
              c[i]= x+ abs(a[i]);
        else if( x<0)
           if( a[i]>=0)
             c[i]=abs(x)+a[i];
             else if( a[i]<0)
               c[i]=abs(x-a[i]);           
}
   for( int i=1; i<=n; i++){
       d=d+c[i];
}
cout<< d << endl;
return 0;
}