#include <bits/stdc++.h>
using namespace std;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const long long NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;
const int N = 1e5 + 10;
int n, s = 0, a[N], b[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), b[i] = a[i] / 2, s += b[i];
  for (int i = 1; i <= n; i++) {
    if (a[i] % 2) {
      if (s > 0 && a[i] < 0)
        b[i]--, s--;
      else if (s < 0 && a[i] > 0)
        b[i]++, s++;
    }
  };
  for (int i = 1; i <= n; i++) printf("%d\n", b[i]);
}
