#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  char ch = getchar();
  long long s = 0, w = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    s = s * 10 + ch - '0';
    ch = getchar();
  }
  return s * w;
}
int n;
int a[300010], s, b[300010];
inline int lowbit(int x) { return x & (-x); }
int main() {
  n = read();
  for (register int i = 1; i <= n; i++) a[i] = read();
  for (register int i = 1; i <= n; i++) {
    int g = abs(a[i]);
    if (g & 1) (a[i] > 0 ? s++ : s--);
  }
  s /= 2;
  if (s > 0) {
    for (register int i = 1; i <= n; i++)
      if (a[i] > 0 && (a[i] & 1) && s)
        b[i] = (a[i] / 2 + 1), s--;
      else
        b[i] = a[i] / 2;
  } else {
    for (register int i = 1; i <= n; i++)
      if (a[i] < 0 && ((-a[i]) & 1) && s)
        b[i] = (a[i] / 2 - 1), s++;
      else
        b[i] = a[i] / 2;
  }
  for (register int i = 1; i <= n; i++) cout << b[i] << '\n';
  return 0;
}
