#include <bits/stdc++.h>
using namespace std;
int min(int a, int b) {
  if (abs(a) < abs(b))
    return a;
  else
    return b;
}
int main() {
  int n, sum = 0, k = 0;
  int a[2000];
  cin >> n;
  n *= 2;
  for (int i = 0; i < n; i++) {
    double q;
    cin >> q;
    a[i] = (int)(q * 1000 + 0.00001);
    a[i] %= 1000;
    sum += a[i];
    if (a[i] == 0) k++;
  }
  int q;
  if (k > n / 2)
    q = (n - k) * 2;
  else
    q = n / 2;
  int delta = sum - 1000 * q;
  for (int i = 0; i < min(q, k); i++) delta = min(delta, delta + 1000);
  int ans = abs(delta);
  if (ans) {
    cout << ans / 1000 << ".";
    ans %= 1000;
    cout << ans / 100 << ans % 100 / 10 << ans % 10;
  } else
    cout << "0.000";
}
