#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, i, k, l, flag = 1, y;
  double x;
  vector<long long> V;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> k;
    V.push_back(k);
  }
  for (i = 0; i < n; i++) {
    if (V[i] % 2 == 0)
      cout << V[i] / 2 << endl;
    else {
      y = floor(double(V[i]) / 2);
      if (flag == 1) {
        cout << y << endl;
        flag = 0;
      } else {
        cout << y + 1 << endl;
        flag = 1;
      }
    }
  }
}
