#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int dpodd[maxn], dpeven[maxn], dp[maxn];
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int size = sizeof(a) / sizeof(a[0]);
  sort(a, a + size);
  int minegad = -1, minegodad = -1;
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == -1 or a[i] % 2 == 1 and a[i] < 0) {
      minegodad = i;
    }
    if (a[i] < 0) {
      minegad = i;
    } else {
      break;
    }
  }
  int minodad = -1;
  for (int i = minegad; i < n; i++) {
    if (a[i] % 2 == 1) {
      minodad = i;
      break;
    }
  }
  if (minegad == n - 1) {
    cout << a[minegodad];
  } else {
    for (int i = minegad + 1; i < n; i++) {
      if (a[i] % 2 == 1) {
        dpodd[i] = dpodd[i - 1] + a[i];
        dpeven[i] = dpeven[i - 1];
      } else if (a[i] % 2 == 0) {
        dpeven[i] = dpeven[i - 1] + a[i];
        dpodd[i] = dpodd[i - 1];
      }
    }
    if (dpodd[n - 1] % 2 == 1) {
      cout << dpodd[n - 1] + dpeven[n - 1];
    } else {
      if (abs(a[minegodad]) < a[minodad]) {
        cout << dpodd[n - 1] + a[minegodad] + dpeven[n - 1];
      } else {
        cout << dpodd[n - 1] - a[minodad] + dpeven[n - 1];
      }
    }
  }
  return 0;
}
