#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; n > i; i++) cin >> a[i];
  int minodd = 0;
  int pluodd = 0;
  for (int i = 0; n > i; i++) {
    if (a[i] < 0) {
      if (a[i] % 2) {
        minodd++;
      }
    } else if (a[i] > 0) {
      if (a[i] % 2) {
        pluodd++;
      }
    }
  }
  int retminodd = 0;
  int retpluodd = 0;
  if (minodd % 2) {
    retminodd = -1;
    retpluodd = -1;
  }
  for (int i = 0; n > i; i++) {
    if (a[i] % 2) {
      if (a[i] > 0) {
        if (pluodd / 2 > retpluodd) {
          cout << a[i] / 2 + 1 << endl;
        } else {
          cout << a[i] / 2 << endl;
        }
        retpluodd++;
      } else {
        if (minodd / 2 > retminodd) {
          cout << a[i] / 2 - 1 << endl;
        } else {
          cout << a[i] / 2 << endl;
        }
        retminodd++;
      }
    } else {
      cout << a[i] / 2 << endl;
    }
  }
}
