#include using namespace std; int main() { int N; cin >> N; vector A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } long long plus = 0; long long minus = 0; for (int i = 0; i < N; i++) { if (A[i] >= 0) { plus += A[i]; } else { minus += -A[i]; } } cout << plus - minus; }