#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int lcm(int x, int y) { return x / gcd(x, y) * y; }
int lowbit(int x) { return x & (-x); }
int quickmod(int x, int y, int mod) {
  x = x % mod;
  int ans = 1;
  while (y) {
    if (y & 1) ans = 1LL * ans * x % mod;
    y >>= 1;
    x = 1LL * x * x % mod;
  }
  return ans;
}
const int INF = 0x3f3f3f3f;
const double EPS = 1e-5;
const double PI = acos(-1.0);
const int MOD = 1e9 + 7;
int num[105];
int main() {
  int n;
  scanf("%d", &n);
  int sum1 = 0;
  int sum2 = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &num[i]);
    if (num[i] > 0)
      sum1 += num[i];
    else
      sum2 += num[i];
  }
  printf("%d\n", sum1 - sum2);
  return 0;
}
