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