#include <bits/stdc++.h>
using namespace std;
#pragma GCC push_options
#pragma GCC optimize("unroll-loops")
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long ar[n];
  long long count1 = 0ll;
  long long count2 = 0ll;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    if (abs(ar[i]) % 2 == 1) {
      if (ar[i] < 0)
        count1++;
      else
        count2++;
    }
  }
  if (count1 == count2) {
    for (int i = 0; i < n; i++) {
      cout << ar[i] / 2 << "\n";
    }
  } else if (count1 > count2) {
    long long diff = count1 - count2;
    diff /= 2;
    for (int i = 0; i < n; i++) {
      if (abs(ar[i]) % 2 == 0)
        cout << ar[i] / 2 << "\n";
      else {
        if (ar[i] < 0 && diff != 0) {
          cout << ar[i] / 2 - 1 << "\n";
          diff--;
        } else
          cout << ar[i] / 2 << "\n";
      }
    }
  } else {
    long long diff = count2 - count1;
    diff /= 2;
    for (int i = 0; i < n; i++) {
      if (abs(ar[i]) % 2 == 0)
        cout << ar[i] / 2 << "\n";
      else {
        if (ar[i] > 0 && diff != 0) {
          cout << ar[i] / 2 + 1 << "\n";
          diff--;
        } else
          cout << ar[i] / 2 << "\n";
      }
    }
  }
  return 0;
}
