#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n, 0), b(n);
  int su = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x;
    y = abs(x);
    b[i] = floor(x / 2.0);
    su += b[i];
    if (y % 2 != 0) a[i] = 1;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] == 0)
      cout << b[i] << '\n';
    else {
      if (su == 0)
        cout << b[i] << '\n';
      else {
        b[i]++;
        su++;
        cout << b[i] << '\n';
      }
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  double t1 = clock();
  int t;
  t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  cerr << setprecision(10) << (clock() - t1) / CLOCKS_PER_SEC << "\n";
  return 0;
}
