#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int maxn = 15000;
int n, a[maxn];
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int flag = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 0)
      a[i] = a[i] / 2;
    else {
      if (flag == 0) {
        a[i] = (a[i] - 1) / 2;
        flag = 1;
      } else {
        a[i] = (a[i] + 1) / 2;
        flag = 0;
      }
    }
  }
  for (int i = 0; i < n; i++) cout << a[i] << '\n';
  return 0;
}
