#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  vector<int> ans(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  int countn = 0, countp = 0;
  for (int i = 0; i < n; i++) {
    if (v[i] % 2 != 0) {
      if (v[i] < 0)
        countn++;
      else
        countp++;
    }
    ans[i] = v[i] / 2;
  }
  if (countn > countp) {
    int k = (countn - countp) / 2;
    for (int i = 0; i < n; i++) {
      if (v[i] % 2 != 0 && v[i] < 0 && k > 0) {
        ans[i] -= 1;
        k--;
      }
    }
  } else {
    int k = (countp - countn) / 2;
    for (int i = 0; i < n; i++) {
      if (v[i] % 2 != 0 && v[i] > 0 && k > 0) {
        ans[i] += 1;
        k--;
      }
    }
  }
  for (int i : ans) cout << i << "\n";
  return 0;
}
