#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000020;
const int maxm = 1000020;
const int MOd = 998244353;
int a, ar[maxn], c[maxn];
void go(int &a) {
  if (a < 0)
    a = (a - 1) / 2;
  else
    a /= 2;
}
void solve() {
  scanf("%d", &a);
  int t = 0;
  long long sum = 0;
  for (int i = 1; i <= a; i++) {
    scanf("%d", &ar[i]);
    c[i] = ar[i] & 1;
    if (c[i]) t++;
    go(ar[i]);
    sum += ar[i];
  }
  assert(sum <= 0);
  int i = 1;
  while (sum < 0 && i <= a) {
    if (c[i]) sum++, ar[i]++;
    i++;
  }
  for (int i = 1; i <= a; i++) printf("%d\n", ar[i]);
}
int main() {
  int n = 1;
  while (n--) solve();
  return 0;
}
