#include <bits/stdc++.h>
int max(int a, int b) { return a > b ? a : b; }
int min(int a, int b) { return a < b ? a : b; }
int main() {
  int n;
  scanf("%d", &n);
  double a[4005];
  for (int i = 0; i < n * 2; i++) scanf("%lf", &a[i]);
  int kol_int = 0, sum_int = 0;
  double sum = 0;
  for (int i = 0; i < n * 2; i++) {
    double tmp = a[i];
    sum += tmp;
    if (tmp == (double)(int)tmp) kol_int++;
    sum_int += (int)tmp;
  }
  int maximal = min(n, 2 * n - kol_int);
  int minimal = max(n - kol_int, 0);
  double ans = 10000000000.;
  for (int i = minimal; i <= maximal; i++) {
    double tmp = fabs(sum - (double)(sum_int + i));
    if (tmp < ans) ans = tmp;
  }
  printf("%.3lf", ans);
  return 0;
}
