#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  double sum1 = 0, sum2 = 0;
  int cnt = 0;
  int Max, Min;
  for (int i = 0; i < 2 * n; i++) {
    double a;
    scanf("%lf", &a);
    sum1 += a;
    sum2 += floor(a);
    if (ceil(a) - 0.5 > floor(a)) cnt++;
  }
  Max = min(n, cnt);
  Min = max(0, n - (2 * n - cnt));
  double Mindiff = 999999999999999;
  for (int i = Min; i <= Max; i++) {
    Mindiff = min(Mindiff, fabs(sum2 + i - sum1));
  }
  printf("%.3lf\n", Mindiff);
  return 0;
}
