#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sum = 0;
  cin >> n;
  vector<float> a(n);
  vector<long long> b(n);
  for (int i = 0; i < n; i++) {
    float temp;
    cin >> temp;
    a[i] = temp;
    if (temp > 0)
      b[i] = floor(temp);
    else
      b[i] = ceil(temp);
    sum += b[i];
  }
  int j = 0;
  while (sum != 0 && j < n) {
    if (sum < 0 && a[j] > 0 && a[j] != round(a[j])) {
      b[j]++;
      sum++;
    }
    if (sum > 0 && a[j] < 0 && a[j] != round(a[j])) {
      b[j]--;
      sum--;
    }
    j++;
  }
  for (int i = 0; i < n; i++) {
    cout << b[i] << endl;
  }
  return 0;
}
