#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<string, int> &a, const pair<string, int> &b) {
  return (a.second < b.second);
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  vector<long long> v1 = v;
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    v[i] = v[i] / 2;
    sum += v[i];
  }
  for (long long i = 0; i < n; i++) {
    if (sum > 0 && v1[i] % 2 != 0 && v1[i] < 0) {
      v[i]--;
      sum--;
    } else if (sum < 0 && v1[i] % 2 != 0 && v1[i] > 0) {
      v[i]++;
      sum++;
    }
  }
  for (long long i = 0; i < n; i++) {
    cout << v[i] << endl;
  }
  return 0;
}
