#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  long long res = 0, odd = 10000000000;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] > 0) res += (long long)a[i];
    if (a[i] % 2 == 1 && a[i] < odd) odd = a[i];
  }
  if (res % 2 == 1) res -= odd;
  if (res < 0) res = 0;
  cout << res;
}
