#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
const double eps = 1e-12;
int dcmp(double x) {
  if (fabs(x) < eps)
    return 0;
  else
    return x < 0 ? -1 : 1;
}
int main() {
  double sum = 0;
  int n;
  int num = 0;
  cin >> n;
  for (int i = 1; i <= 2 * n; i++) {
    double a;
    scanf("%lf", &a);
    if (dcmp(floor(a) - a) == 0) num++;
    sum += a - floor(a);
  }
  double ans = 1e10;
  for (int i = max(num - n, 0); i <= min(n, num); i++) {
    ans = min(ans, fabs(sum - (n - i)));
  }
  printf("%.3lf\n", ans);
}
