#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
const int MOD = 1e9 + 7;
int a[N];
int sum = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    sum += a[i] / 2;
    if (a[i] < 0 && a[i] % 2) sum--;
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] % 2) {
      if (sum < 0) {
        if (a[i] > 0)
          cout << a[i] / 2 + 1 << "\n";
        else
          cout << a[i] / 2 << "\n";
        sum++;
      } else {
        if (a[i] > 0)
          cout << a[i] / 2 << "\n";
        else
          cout << a[i] / 2 - 1 << "\n";
      }
    } else {
      cout << a[i] / 2 << "\n";
    }
  }
  return 0;
}
