#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  double res;
  scanf("%d", &n);
  int num = 0;
  for (int i = 1; i <= 2 * n; i++) {
    double x;
    scanf("%lf", &x);
    res += x - floor(x);
    if (x != ceil(x)) num++;
  }
  int k = min(n, num);
  double ans = 0x3f3f3f3f;
  for (int i = 0; i <= k; i++) {
    if (i + n >= num) ans = min(ans, fabs(res - (double)i));
  }
  printf("%0.3lf", ans);
  return 0;
}
