#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sum = 0;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i] / 2;
  }
  if (sum > 0) {
    for (int i = 0; i < n; i++) {
      if (a[i] % 2 != 0 && a[i] < 0 && sum != 0) {
        a[i] = a[i] / 2 - 1;
        sum--;
      } else {
        a[i] /= 2;
      }
      cout << a[i] << " ";
    }
    return 0;
  }
  if (sum < 0) {
    for (int i = 0; i < n; i++) {
      if (a[i] % 2 != 0 && a[i] > 0 && sum != 0) {
        a[i] = a[i] / 2 + 1;
        sum++;
      } else {
        a[i] /= 2;
      }
      cout << a[i] << " ";
    }
    return 0;
  }
  if (sum == 0) {
    for (int i = 0; i < n; i++) {
      cout << a[i] / 2 << " ";
    }
    return 0;
  }
  return 0;
}
