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