#include <bits/stdc++.h>
using namespace std;
double a[5010];
int sum, u;
double sum2, add = 1000000;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < 2 * n; i++) {
    double e;
    cin >> e;
    sum += int(e);
    sum2 += e;
    if (int(e) != e) u++;
  }
  for (int i = max(u - n, 0); i <= min(u, n); i++) {
    add = min(add, abs(double(sum + i - sum2)));
  }
  cout << fixed << setprecision(3) << add << endl;
}
