#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int mod = 1500000001;
const int maxn = 1e6 + 7;
const double pi = acos(-1.0);
const int v2 = (mod + 1) / 2;
int n;
int main() {
  scanf("%d", &n);
  int ans = 0, a;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    if (a >= 0)
      ans += a;
    else
      ans -= a;
  }
  printf("%d\n", ans);
  return 0;
}
