#include <bits/stdc++.h>
using namespace std;
const int N = 2e4 + 10;
int ans[N], a[N], b[N];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  int res = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = abs(a[i]);
    ans[i] = a[i] / 2;
    res += a[i] / 2;
  }
  for (int i = 1; i <= n; i++) {
    if (res > 0) {
      if (a[i] < 0 && b[i] % 2) {
        ans[i]--;
        res--;
      }
    } else if (res < 0) {
      if (a[i] > 0 && b[i] % 2) {
        ans[i]++;
        res++;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << endl;
  }
  return 0;
}
