#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, nn, z = 0, mn, mx;
  double sm1 = 0, sm2 = 0, v[4005], ans = 10000000000;
  cin >> n;
  nn = n * 2;
  for (int i = 0; i < nn; i++) {
    cin >> v[i];
    sm1 += v[i];
    sm2 += (int)v[i];
    if (v[i] == (int)v[i]) {
      z++;
    }
  }
  mn = max(0, n - z);
  mx = min(n, (2 * n) - z);
  for (int i = mn; i <= mx; i++) {
    ans = min(ans, fabs(sm2 + i - sm1));
  }
  printf("%0.3lf\n", ans);
  return 0;
}
