#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool inc = true;
  vector<int> ans(n);
  int evenI = -1;
  for (int i = 0; i < n; i++) {
    double v;
    cin >> v;
    int t = v;
    if (t % 2 == 0) {
      ans[i] = v / 2;
      evenI = i;
    } else {
      v /= 2;
      if (inc)
        v = ceil(v);
      else
        v = floor(v);
      inc = !inc;
      ans[i] = v;
    }
  }
  if (!inc) ans[evenI]--;
  for (int i = 0; i < n; i++) cout << ans[i] << endl;
}
