#include <bits/stdc++.h>
using namespace std;
bool b[500010];
bool label[500010];
int a[500010];
int main() {
  int n;
  cin >> n;
  long long sum = 0;
  for (int i = (1); i <= (n); ++i) {
    double num;
    cin >> num;
    a[i] = int(num);
    if (fabs(num - a[i]) > 0.000001) b[i] = true;
    sum += a[i];
    label[i] = (num > 0);
  }
  for (int i = (1); i <= (n); ++i) {
    if (sum < 0 && label[i] && b[i]) a[i]++, sum++;
    if (sum > 0 && !label[i] && b[i]) a[i]--, sum--;
    cout << a[i] << endl;
  }
  return 0;
}
