#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0, strt;
  scanf("%d", &n);
  double a[4010], ans = 0;
  for (int i = 0; i < 2 * n; i++) {
    scanf("%lf", &a[i]);
    if (a[i] != (int)a[i]) count++;
    ans = ans + a[i] - (int)a[i];
  }
  if (count > n) strt = count - n;
  count = min(count, n);
  int ab = (int)ans;
  double best = 1000000;
  for (int i = strt; i <= count; i++)
    if (abs(i - ans) < best) best = abs(i - ans);
  printf("%.3lf\n", best);
  return 0;
}
