#include <bits/stdc++.h>
using namespace std;
long long a[110], n;
int main() {
  while (~scanf("%lld", &n)) {
    for (long long i = 1; i <= n; i++) scanf("%lld", &a[i]);
    long long sum = 0;
    for (long long i = 1; i <= n; i++) {
      if (a[i] < 0) a[i] = -a[i];
      sum += a[i];
    }
    printf("%lld\n", sum);
  }
  return 0;
}
