#include <bits/stdc++.h>
int main() {
  int n, i, j;
  int a, b, c, r;
  while (scanf("%d", &n) == 1) {
    c = 0;
    r = 0;
    for (i = 1; i <= 2 * n; i++) {
      scanf("%d.%d", &a, &b);
      r += b;
      if (b == 0) {
        c++;
      }
    }
    r -= 1000 * n;
    while (c > 0 && r < -500) {
      r += 1000;
      c--;
    }
    r = abs(r);
    printf("%d.%03d\n", r / 1000, r % 1000);
  }
  return 0;
}
