#include <bits/stdc++.h>
using namespace std;
const int N = 5e3;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const double eps = 1e-6;
int n, m;
double p, sum, ans = INF;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  scanf("%d", &n);
  for (int i = 1; i <= n << 1; i++) {
    scanf("%lf", &p);
    int c = (int)p;
    sum += (p - c);
    if (abs(c - p) < eps) m++;
  }
  for (int i = max(0, m - n); i <= min(n, m); i++)
    ans = min(ans, abs(sum - n + i));
  printf("%.3lf", ans);
  return 0;
}
