#include <bits/stdc++.h>
int main() {
  int i, n, k;
  double u, sum, res;
  while (scanf("%d", &n) != EOF) {
    res = 1e10;
    sum = k = 0;
    for (i = 1; i <= n + n; i++) {
      scanf("%lf", &u);
      sum += (u - (int)u);
      if (u - (int)u == 0) k++;
    }
    for (i = n - k; i <= n; i++)
      res = ((res) > (fabs(i - sum))) ? (fabs(i - sum)) : (res);
    printf("%.3lf\n", res);
  }
  return 0;
}
