#include <bits/stdc++.h>
using namespace std;
const long long PI = 3.1415926535897932384626;
const long long mod = 1000000007;
const long long FMOD = 998244353;
const long long N = 100005;
const double eps = 1e-9;
long long check(double n) {
  double x = n * n;
  if ((x - (long long)x) == 0)
    return 1;
  else
    return 0;
}
int main() {
  long long n;
  cin >> n;
  double x;
  vector<double> v, p;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
  }
  p = v;
  for (long long i = 0; i < n; i++) {
    v[i] = floor(v[i]);
  }
  long long s = 0;
  for (long long i = 0; i < n; i++) s += v[i];
  if (s == 0) {
    for (long long i = 0; i < n; i++) cout << v[i] << "\n";
  } else {
    for (long long i = 0; i < n; i++) {
      if (!check(p[i])) {
        v[i]++;
        s++;
      }
      if (s == 0) {
        break;
      }
    }
    for (long long i = 0; i < n; i++) cout << v[i], cout << "\n";
  }
}
