#include <bits/stdc++.h>
using namespace std;
template <class T>
bool uin(T &a, T b) {
  return (a > b ? a = b, true : false);
}
template <class T>
bool uax(T &a, T b) {
  return (a < b ? a = b, true : false);
}
int const MAXN = 141;
int a[MAXN];
int n;
void solve() {
  int x = 0;
  int y = 0;
  for (int i = 1; i <= n; ++i) {
    if (a[i] < 0) {
      x += a[i];
    } else {
      y += a[i];
    }
  }
  printf("%d\n", y - x);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  solve();
  return 0;
}
