#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  double sum = -n;
  int fc = 0;
  for (int i = 1; i <= 2 * n; i++) {
    double a;
    cin >> a;
    int ai = a;
    if (a - ai == 0) fc++;
    sum += a - ai;
  }
  double ans = 1000000000;
  for (int i = 0; i <= fc; i++) ans = min(abs(sum + i), ans);
  cout.precision(3);
  cout << fixed << ans << endl;
}
