#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
double a[4004];
long long zeroes = 0;
void solve() {
  long long n;
  cin >> n;
  double sum = 0;
  for (long long i = 0; i < 2 * n; ++i) {
    cin >> a[i];
    a[i] -= floor(a[i]);
    sum += a[i];
    if (a[i] == 0.0) ++zeroes;
  }
  double ans = 1e9;
  for (long long i = 0; i < n + 1; ++i) {
    if (i <= zeroes and n - i <= 2 * n - zeroes) {
      ans = min(ans, abs(n - i - sum));
    }
  }
  cout << fixed << setprecision(3) << ans << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
