#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, s = 0;
  cin >> n;
  int a[n], b[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 1 && a[i] < 0)
      b[i] = a[i] / 2 - 1;
    else
      b[i] = a[i] / 2;
    s += b[i];
  }
  if (s == 0)
    ;
  else if (s > 0) {
    i = 0;
    while (s != 0) {
      if (a[i] % 2 != 0 && a[i] < 0) {
        b[i] = b[i] - 1;
        s = s - 1;
      }
      i++;
    }
  } else {
    i = 0;
    while (s != 0) {
      if (a[i] % 2 != 0 && a[i] > 0) {
        b[i] += 1;
        s += 1;
      }
      i++;
    }
  }
  for (i = 0; i < n; i++) cout << b[i] << endl;
  return 0;
}
