#include <bits/stdc++.h>
using namespace std;
int a[100001];
int b[100001];
int main() {
  int n;
  cin >> n;
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = a[i] / 2;
    sum += b[i];
  }
  for (int i = 1; i <= n; i++) {
    if (sum == 0) break;
    if (a[i] % 2 == 0) continue;
    if (sum < 0) {
      if (a[i] > 0) {
        sum -= b[i];
        b[i] = (a[i] + 1) / 2;
        sum += b[i];
      }
    }
    if (sum > 0) {
      if (a[i] < 0) {
        sum -= b[i];
        b[i] = (a[i] - 1) / 2;
        sum += b[i];
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << b[i] << endl;
  }
  return 0;
}
