#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int m = 0;
    int sum = 0;
    double ssum = 0;
    int ma = n, mi = 0;
    for (int i = 0; i < 2 * n; i++) {
      double a;
      scanf("%lf", &a);
      sum += (int)a;
      ssum += a;
      if (a != (int)a) m++;
    }
    ma = min(ma, m);
    mi = max(m - n, mi);
    double ans = 10000;
    for (int i = mi; i <= ma; i++) ans = min(ans, abs(sum + i - ssum));
    printf("%.3f\n", ans);
  }
  return 0;
}
