#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
int n;
int ans;
int main() {
scanf("%d", &n);
for (int i = 1;i <= n;++i) {
int a;
scanf("%d", &a);
ans += abs(a);
}
printf("%d\n", ans);
return 0;
}