#include <bits/stdc++.h>
using namespace std;
int N;
double a[4005];
double sum, sol = -1u / 2;
int cnt;
int main() {
  scanf("%d", &N);
  for (int c = 0; c < 2 * N; c++) {
    scanf("%lf", &a[c]);
    if (a[c] != floor(a[c])) {
      sum += a[c] - floor(a[c]);
      cnt++;
    }
  }
  for (int c = max(0, cnt - N); c <= min(cnt, N); c++) {
    double tmp = sum - (double)c;
    sol = min(sol, fabs(tmp));
  }
  printf("%.3lf\n", sol);
}
