#include <bits/stdc++.h>
using namespace std;
const int N = 4040;
int main() {
  int n, i, j, tmp, ca, t;
  double ans, a, ot;
  while (scanf("%d", &n) != EOF) {
    ans = 0;
    t = ca = 0;
    for (i = 0; i < 2 * n; i++) {
      scanf("%lf", &a);
      tmp = a;
      if (a - tmp < 1e-8) t++;
      ans += a - tmp;
    }
    ca += n - t;
    ot = fabs(ans - ca);
    for (i = max(0, ca); i <= n; i++) {
      ot = min(ot, fabs(ans - i));
    }
    printf("%.3lf\n", ot);
  }
}
