#include <bits/stdc++.h>
using namespace std;
long long n, ar[10000], nuls, sum, rdown, rup, bans, ts;
double temp;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n * 2; i++) {
    cin >> temp;
    ar[i] = temp * 1000 + 1e-3;
    if (ar[i] % 1000 == 0) nuls++;
    sum += ar[i];
  }
  bans = 1000000000;
  for (int ndown = 0; ndown <= nuls; ++ndown) {
    if (ndown > n) continue;
    rdown = n - ndown;
    rup = n - (nuls - ndown);
    if (rup > n) continue;
    if (rup < 0) continue;
    ts = 0;
    for (int i = 1; i <= n * 2; i++)
      if (ar[i] % 1000 == 0)
        ts += ar[i];
      else if (rdown > 0) {
        ts += (ar[i] - ar[i] % 1000);
        --rdown;
      } else if (rup > 0) {
        ts += ar[i] - ar[i] % 1000 + 1000;
        --rup;
      }
    if (abs(ts - sum) < bans) bans = abs(ts - sum);
  }
  cout << bans / 1000 << ".";
  bans %= 1000;
  cout << bans / 100;
  bans %= 100;
  cout << bans / 10;
  cout << bans % 10 << endl;
  cin.get();
  cin.get();
  return 0;
}
