#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long x;
    long long k = 0;
    for (long long i = 0; i < n; i++) {
      cin >> x;
      if (x % 2 == 0)
        cout << x / 2 << endl;
      else if (k % 2 == 0) {
        cout << (x + 1) / 2 << endl;
        k++;
      } else {
        cout << (x - 1) / 2 << endl;
        k++;
      }
    }
  }
}
