#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
const int inf = 1e9;
int n;
int a[N];
bool notc[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] % 2 != 0) notc[i] = true;
    sum += a[i] / 2;
  }
  for (int i = 0; i < n && sum; ++i) {
    if (notc[i])
      if (sum > 0) {
        if (a[i] < 0) {
          --a[i];
          --sum;
        }
      } else {
        if (a[i] > 0) {
          ++a[i];
          ++sum;
        }
      }
  }
  for (int i = 0; i < n; ++i) cout << (a[i] / 2) << endl;
}
