#include <bits/stdc++.h>
using namespace std;
const int INF = (1 << 30) - 1;
const long long oo = (1ll << 62) - 1;
const long double PI = 3.1415926535898;
const int N = 100000 + 5;
int a[N];
int n;
void solve() {}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int da = 0, dd = 0;
  int s = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] % 2 == 0) {
      s += a[i] / 2;
    } else {
      if (a[i] < 0) {
        s += a[i] / 2 - 1;
      } else {
        s += a[i] / 2;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] % 2 == 0)
      cout << a[i] / 2 << '\n';
    else {
      if (s < 0) {
        if (a[i] < 0)
          cout << a[i] / 2 << '\n';
        else
          cout << a[i] / 2 + 1 << '\n';
        s += 1;
      } else {
        if (a[i] < 0)
          cout << a[i] / 2 - 1 << '\n';
        else
          cout << a[i] / 2 << '\n';
      }
    }
  }
}
