#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, m = 0, x;
  double t, ans = 1e9, sum = 0.0;
  cin >> n;
  for (i = 0; i < n * 2; i++) {
    cin >> t;
    x = t;
    sum += t - x;
    if (t == x * 1.0) m++;
  }
  for (i = max(0, m - n); i <= min(n, m); i++) {
    ans = min(ans, abs(sum - n + i));
  }
  cout << fixed << setprecision(3) << ans << endl;
  return 0;
}
