#include <bits/stdc++.h>
using namespace std;
const int maxn = 13845;
int a[maxn + 5], b[maxn + 5];
int n;
int sum = 0;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < n; i++) b[i] = a[i] / 2;
  for (int i = 0; i < n; i++) sum += b[i];
  if (sum > 0) {
    if (sum > 0) {
      for (int i = 0; i < n; i++)
        if (a[i] < 0 && a[i] % 2 != 0) {
          b[i]--;
          sum--;
          if (sum == 0) break;
        }
    }
  } else if (sum < 0) {
    for (int i = 0; i < n; i++)
      if (a[i] > 0 && a[i] % 2 != 0) {
        b[i]++;
        sum++;
        if (sum == 0) break;
      }
  }
  for (int i = 0; i < n; i++) printf("%d\n", b[i]);
  return 0;
}
