#include <bits/stdc++.h>
const long long infll = 4e18;
const int infint = 2e9;
using namespace std;
int dx[] = {-1, 0, 1, 0, -1, 1, 1, -1};
int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
int SIZE = 1e5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, arr[100], sum = 0, num;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> num;
    if (num < 0)
      sum -= num;
    else
      sum += num;
  }
  cout << sum;
}
