#include <bits/stdc++.h>
using namespace std;
const int N = 4000;
int n;
double arr[N];
double s_1 = 0, s_2 = 0;
bool vis[N];
int main(int argc, char *argv[]) {
  memset(vis, false, sizeof(vis));
  scanf("%d", &n);
  n *= 2;
  for (int i = 0; i < n; ++i) {
    scanf("%lf", &arr[i]);
    s_1 += arr[i];
    s_2 += floor(arr[i]);
  }
  int r = 0;
  for (int i = 0; i < n && r < n / 2; ++i) {
    if (ceil(arr[i]) > floor(arr[i])) {
      if (abs(s_1 - s_2 - 1) < abs(s_1 - s_2)) {
        s_2++;
        vis[i] = true;
        r++;
      }
    }
  }
  for (int i = 0; i < n && r < n / 2; ++i) {
    if (ceil(arr[i]) == floor(arr[i])) {
      r++;
      vis[i] = true;
    }
  }
  for (int i = 0; i < n && r < n / 2; ++i) {
    if (!vis[i]) {
      s_2++;
      r++;
    }
  }
  printf("%.3lf", abs(s_1 - s_2));
  return 0;
}
