#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  vector<bool> flag(n, false);
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (abs(a[i]) & 1) {
      flag[i] = true;
      if (a[i] < 0) {
        a[i]--;
      }
    }
    a[i] >>= 1;
    sum += a[i];
  }
  for (int i = 0; i < n; ++i) {
    if (sum < 0 && flag[i]) {
      ++sum;
      ++a[i];
    }
    cout << a[i] << '\n';
  }
  return 0;
}
