#include <bits/stdc++.h>
using namespace std;
const int N = 14005;
int nums[N];
int sww[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> nums[i];
  int neg = 0;
  int pos = 0;
  for (int i = 1; i <= n; i++) {
    if (nums[i] == 1) {
      pos++;
      sww[i] = 1;
      nums[i] /= 2;
      continue;
    }
    if (nums[i] == -1) {
      neg++;
      sww[i] = -1;
      nums[i] /= 2;
      continue;
    }
    if (abs(nums[i]) % 2 == 1) {
      if (nums[i] < 0)
        neg++;
      else
        pos++;
      sww[i] = 2;
    }
    nums[i] /= 2;
  }
  int sum = 0;
  for (int i = 1; i <= n; i++) sum += nums[i];
  if (sum == 0) {
    for (int i = 1; i <= n; i++) cout << nums[i] << "\n";
    return 0;
  }
  if (sum < 0) {
    for (int i = 1; i <= n; i++) {
      if (sum != 0 && pos > 0 && nums[i] > 0 && sww[i] == 2) {
        cout << (nums[i] + 1) << "\n";
        pos--;
        sum++;
        continue;
      }
      if (sum != 0 && pos > 0 && sww[i] == 1) {
        cout << "1\n";
        pos--;
        sum++;
        continue;
      }
      cout << nums[i] << "\n";
    }
  } else {
    for (int i = 1; i <= n; i++) {
      if (sum != 0 && neg > 0 && nums[i] < 0 && sww[i] == 2) {
        cout << (nums[i] - 1) << "\n";
        neg--;
        sum--;
        continue;
      }
      if (sum != 0 && neg > 0 && sww[i] == -1) {
        cout << "-1\n";
        neg--;
        sum--;
        continue;
      }
      cout << nums[i] << "\n";
    }
  }
  return 0;
}
