#include <bits/stdc++.h>
using namespace std;
using lint = long long;
int N;
vector<double> A;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> N;
  A.resize(2 * N);
  lint sum = 0;
  int int_cnt = 0;
  double sum_ori = 0;
  for (int i = 0; i < N * 2; i++) {
    cin >> A[i];
    sum += ceil(A[i]);
    if (ceil(A[i]) == A[i]) {
      int_cnt++;
    }
    sum_ori += A[i];
  }
  double ans = 1e18;
  for (int i = max(0, N - int_cnt); i <= min(N, 2 * N - int_cnt); i++) {
    ans = min(ans, abs(sum - sum_ori - i));
  }
  cout << fixed << setprecision(3) << ans << "\n";
  return 0;
}
