#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, a[202], sum = 0;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; i++) {
    if (a[i] >= 0) {
      sum = sum + a[i];
    } else {
      sum = sum + (a[i] * (-1));
    }
  }
  cout << sum;
}
