#include <bits/stdc++.h>
using namespace std;
int main() {
  double array[4001];
  double a, sum = 0;
  int i, ai, ic = 0, n;
  cin >> n;
  for (i = 0; i < 2 * n; ++i) {
    cin >> a;
    ai = a;
    if (a - ai == 0) {
      ++ic;
    }
    array[i] = a - ai;
    sum += array[i];
  }
  double M;
  double ans = 1000000000;
  M = n - sum;
  for (i = 0; i <= min(ic, n); ++i) {
    ans = min(ans, abs(M - i));
  }
  cout.precision(3);
  cout << fixed << ans << "\n";
}
