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