#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 220;
int a[N];
int b[N];
int main()
{
int n;
cin>>n;
int sum1 = 0;
int sum2 = 0;
for(int i = 0;i<n;i++)
{
cin>>a[i];
if(a[i]<0) sum1+=a[i];
else sum2+=a[i];
}
cout<<sum2-sum1;
}