#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[20000], i, j, s = 1;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    if (a[i] % 2) {
      printf("%d\n", (s + a[i]) / 2);
      s *= -1;
    } else
      printf("%d\n", a[i] / 2);
  }
  return 0;
}
