#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const double eps = 1e-5;
int n, a[maxn], b[maxn];
bool ok[maxn];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] % 2 == 0) {
      b[i] = a[i] / 2;
      continue;
    }
    double half = 1.0 * a[i] / 2;
    int up = ceil(half), down = floor(half);
    if (fabs((up - half) - (half - down) < eps)) {
      ok[i] = 1;
      b[i] = up;
      continue;
    }
    if (up - half < half - down) {
      b[i] = up;
    } else {
      b[i] = down;
    }
  }
  for (int i = 0; i < n; ++i) {
    sum += b[i];
  }
  for (int i = 0; sum > 0 && i < n; ++i) {
    if (ok[i]) {
      --b[i], --sum;
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << b[i] << '\n';
  }
  return 0;
}
