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