#include <bits/stdc++.h>
using namespace std;
int arr[100005];
long long sum = 0;
int n;
vector<int> pos, neg;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    sum += (arr[i] / 2);
    if (arr[i] > 0 && (arr[i] % 2))
      pos.push_back(i);
    else if (arr[i] < 0 && (arr[i] % 2))
      neg.push_back(i);
  }
  if (sum >= 0 && sum <= neg.size()) {
    for (int i = 0; i < n; i++) {
      arr[i] /= 2;
    }
    for (int i = 0; i < sum; i++) arr[neg[i]]--;
    for (int i = 0; i < n; i++) cout << arr[i] << endl;
  } else if (sum < 0 && -sum <= pos.size()) {
    for (int i = 0; i < n; i++) {
      arr[i] /= 2;
    }
    for (int i = 0; i < -sum; i++) arr[pos[i]]++;
    for (int i = 0; i < n; i++) cout << arr[i] << endl;
  }
  return 0;
}
