#include <bits/stdc++.h>
using namespace std;
int n, r, z;
double s;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= 2 * n; i++) {
    double val;
    scanf("%lf", &val);
    double x = floor(val);
    if (val == x)
      z++;
    else
      r++;
    s += val - x;
  }
  double sol = 1e9;
  for (int i = 0; i <= r && i <= n; i++) {
    if (n - i > z) continue;
    sol = min(sol, abs(s - i + 0.0));
  }
  printf("%.3lf\n", sol);
  return 0;
}
