#include <bits/stdc++.h>
int main() {
  int n, i, j, odd = 1;
  scanf("%d", &n);
  int a[n + 1];
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  for (i = 0; i < n; i++) {
    if (a[i] & 1) {
      if (odd) {
        printf("%d\n", (a[i] - 1) / 2);
        odd = 0;
      } else {
        printf("%d\n", (a[i] + 1) / 2);
        odd = 1;
      }
    } else {
      printf("%d\n", a[i] / 2);
    }
  }
  return 0;
}
