#include <bits/stdc++.h>
using namespace std;
double Data[100005];
int Num[100005];
bool flag[100005];
int N, Sum = 0;
int main() {
  scanf("%d", &N);
  for (register int i = 1; i <= N; ++i) {
    scanf("%lf", &Data[i]);
    if (Data[i] == (double)((int)Data[i])) {
      Num[i] = (int)Data[i];
      flag[i] = true;
    } else if (Data[i] > 0.0)
      Num[i] = (int)Data[i] + 1;
    else
      Num[i] = (int)Data[i];
    Sum += Num[i];
  }
  int Count = abs(Sum);
  int Pos = 1;
  while (Count) {
    if (flag[Pos]) {
      ++Pos;
      continue;
    }
    --Num[Pos];
    --Count;
    ++Pos;
  }
  for (register int i = 1; i <= N; ++i) printf("%d\n", Num[i]);
  return 0;
}
