#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  scanf("%d", &n);
  double x = 0.0;
  double s1 = 0.0;
  long long s2 = 0;
  int cnt = 0;
  for (int i = 0; i < 2 * n; ++i) {
    scanf("%lf", &x);
    s1 += x;
    s2 += (int)x;
    if (x - (int)x < 1e-6) {
      cnt++;
    }
  }
  long long smin = s2 + (cnt < n ? (n - cnt) : 0);
  long long smax = s2 + (cnt < n ? n : (2 * n - cnt));
  double ans = 1e9;
  for (long long i = smin; i <= smax; ++i) {
    ans = min(ans, abs(s1 - i));
  }
  printf("%0.3f\n", ans);
  return 0;
}
