#include <bits/stdc++.h>
using namespace std;
double a[10000];
int main() {
  int n, cnt;
  double mn, ans;
  scanf("%d", &n);
  for (int i = 1; i <= 2 * n; i++) scanf("%lf", a + i);
  cnt = 0;
  ans = 0.0;
  for (int i = 1; i <= 2 * n; i++) {
    int x;
    x = int(a[i]);
    if (a[i] == x)
      cnt++;
    else
      ans += a[i] - x;
  }
  ans = 1.0 * 2 * n - 1.0 * cnt - ans;
  mn = 2 * n + 1;
  for (int i = 0; i <= cnt; i++)
    mn = (mn) < (fabs(ans - n + i)) ? (mn) : (fabs(ans - n + i));
  printf("%.3lf", mn);
  return 0;
}
