#include <bits/stdc++.h>
using namespace std;
const int NMAX = 4000;
const int INF = 20000 * 10000;
int v[NMAX + 2], sum = 0;
double total = 0;
int main() {
  int N, dif = 0;
  cin >> N;
  N = 2 * N;
  for (int i = 1; i <= N; ++i) {
    double x;
    cin >> x;
    total += x;
    sum += (int)x;
    if ((int)x != x) dif++;
  }
  double ans = (1 << 30);
  for (int i = max(0, dif - N / 2); i <= min(N / 2, dif); ++i) {
    double meh = fabs((sum + i) * 1.0 - total);
    ans = min(ans, meh);
  }
  cout << fixed << setprecision(3) << ans << '\n';
  return 0;
}
