#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int arr[13900], brr[13900];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int esum = 0;
  int osum = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i] % 2 == 0) {
      brr[i] = arr[i] / 2;
      esum += brr[i];
    } else {
      brr[i] = arr[i] / 2;
      osum += brr[i];
    }
  }
  int diff = osum + esum;
  if (diff > 0) {
    for (int i = 0; i < n; i++) {
      if (diff == 0) break;
      if (arr[i] % 2 == -1 && arr[i] < 0) {
        brr[i]--;
        diff--;
      }
    }
  } else if (diff < 0) {
    for (int i = 0; i < n; i++) {
      if (diff == 0) break;
      if (arr[i] % 2 == 1 && arr[i] > 0) {
        brr[i]++;
        diff++;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << brr[i] << "\n";
  }
}
