#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  vector<double> vec;
  long long res[n];
  long long tot = 0;
  for (int i = 0; i < n; i++) {
    double in;
    cin >> in;
    tot += (long long)in;
    res[i] = (long long)in;
    vec.push_back(in);
  }
  for (int i = 0; i < n; i++) {
    if (tot > 0) {
      if (vec[i] < 0 && (long long)vec[i] != vec[i]) {
        res[i]--;
        tot--;
      }
    } else if (tot < 0) {
      if (vec[i] > 0 && (long long)vec[i] != vec[i]) {
        res[i]++;
        tot++;
      }
    }
  }
  for (int i = 0; i < n; i++) cout << res[i] << '\n';
  return 0;
}
