#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int mxn = 2e5;
int main() {
  int n;
  cin >> n;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    double x;
    cin >> x;
    if ((int)x % 2 == 0) {
      cout << (int)x / 2 << endl;
    } else {
      cnt++;
      int temp = cnt & 1 ? floor(x / 2) : ceil(x / 2);
      cout << temp << endl;
    }
  }
}
