#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, f = 0;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0)
      a[i] /= 2;
    else {
      if (f == 0) {
        a[i] = ceil((float)a[i] / 2);
        f = 1;
      } else {
        a[i] = floor((float)a[i] / 2);
        f = 0;
      }
    }
  }
  for (int i = 0; i < n; i++) cout << a[i] << endl;
  return 0;
}
