352_C. Jeff and Rounding_36722
Jeff got 2n real numbers a1, a2, ..., a2n as a birthday present. The boy hates non-integer numbers, so he decided to slightly "adjust" the numbers he's got. Namely, Jeff consecutively executes n operations, each of them goes as follows:

  * choose indexes i and j (i ≠ j) that haven't been chosen yet; 
  * round element ai to the nearest integer that isn't more than ai (assign to ai: ⌊ ai ⌋); 
  * round element aj to the nearest integer that isn't less than aj (assign to aj: ⌈ aj ⌉). 



Nevertheless, Jeff doesn't want to hurt the feelings of the person who gave him the sequence. That's why the boy wants to perform the operations so as to make the absolute value of the difference between the sum of elements before performing the operations and the sum of elements after performing the operations as small as possible. Help Jeff find the minimum absolute value of the difference.

Input

The first line contains integer n (1 ≤ n ≤ 2000). The next line contains 2n real numbers a1, a2, ..., a2n (0 ≤ ai ≤ 10000), given with exactly three digits after the decimal point. The numbers are separated by spaces.

Output

In a single line print a single real number — the required difference with exactly three digits after the decimal point.

Examples

Input

3
0.000 0.500 0.750 1.000 2.000 3.000


Output

0.250


Input

3
4469.000 6526.000 4864.000 9356.383 7490.000 995.896


Output

0.279

Note

In the first test case you need to perform the operations as follows: (i = 1, j = 4), (i = 2, j = 3), (i = 5, j = 6). In this case, the difference will equal |(0 + 0.5 + 0.75 + 1 + 2 + 3) - (0 + 0 + 1 + 1 + 2 + 3)| = 0.25. 
#! /Library/Frameworks/Python.framework/Versions/Current/bin/python

import math

n = int(raw_input())

aArr = [float(inp) - math.floor(float(inp)) for inp in raw_input().split()]

sumA = 0
zCount = 0

for a in aArr:
	if a == 0.000:
		zCount += 1
	sumA += a

minSum = max(0,n - zCount)
maxSum = min(n,2*n - zCount)

if sumA <= minSum:
	outp = minSum - sumA
elif sumA >= maxSum:
	outp = sumA - maxSum
else:
	outp = min(math.ceil(sumA) - sumA, sumA - math.floor(sumA))

print "%.3f" % outp
3
0.000 0.500 0.750 1.000 2.000 3.000
 3
4469.000 6526.000 4864.000 9356.383 7490.000 995.896
 10
8003.867 4368.000 2243.298 3340.000 5384.489 1036.000 3506.115 4463.317 1477.000 2420.314 9391.186 1696.000 5857.833 244.314 8220.000 5879.647 5424.482 2631.000 7111.130 9157.536
 1
1.100 1.200
 2
950.000 8019.170 3179.479 9482.963
 3
673.674 9263.142 6780.000 9801.000 4640.000 8244.000
 3
6470.000 8295.000 8486.000 9855.000 223.000 579.549
 2
0.001 0.001 0.001 0.001
 1
0.061 0.330
 1
6418.669 157.986
 7
223.999 322.000 677.000 3852.477 2568.390 2410.000 3202.511 2122.870 1566.000 8841.000 8176.424 74.586 3834.000 6847.427
 9
5528.000 205.000 5245.000 8832.000 385.000 7126.000 3988.538 9542.484 3044.000 5288.351 9342.000 9979.000 7096.000 5159.000 9400.000 4996.000 1698.000 5403.000
 7
2341.538 9232.119 6646.930 9316.834 5684.000 9078.705 7773.000 3823.674 6357.022 9866.925 310.271 6554.778 8341.098 8407.987
 7
223.000 322.652 677.700 3852.000 2568.390 2410.713 3202.511 2122.870 1566.689 8841.790 8176.424 74.586 3834.000 6847.000
 4
0.999 0.999 0.999 0.999 0.999 0.999 0.000 0.000
 3
4469.437 6526.605 4864.154 9356.383 7490.717 995.896
 1
0.900 0.900
 5
0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001
 7
2341.000 9232.000 6646.000 9316.000 5684.000 9078.000 7773.978 3823.000 6357.000 9866.000 310.000 6554.000 8341.000 8407.987
 5
4103.000 6413.459 1796.000 3486.799 9011.590 5564.000 9044.473 5922.000 3350.039 3746.000
 2
0.200 0.200 0.200 0.200
 9
5528.000 205.031 5245.169 8832.592 385.656 7126.360 3988.000 9542.000 3044.042 5288.351 9342.000 9979.021 7096.000 5159.200 9400.000 4996.735 1698.000 5403.939
 3
673.000 9263.000 6780.254 9801.548 4640.663 8244.038
 10
8003.000 4368.194 2243.000 3340.287 5384.000 1036.456 3506.000 4463.000 1477.787 2420.000 9391.000 1696.913 5857.000 244.000 8220.322 5879.000 5424.000 2631.197 7111.000 9157.000
 7
2341.538 9232.119 6646.930 9316.834 5684.640 9078.705 7773.000 3823.674 6357.022 9866.925 310.271 6554.778 8341.098 8407.000
 3
6470.649 8295.000 8486.000 9855.000 223.000 579.549
 1
6418.000 157.986
 10
0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900 0.900
 3
6470.649 8295.806 8486.730 9855.351 223.102 579.000
 2
0.999 0.999 0.999 0.999
 3
4469.000 6526.000 4864.000 9356.000 7490.000 995.000
 7
223.999 322.000 677.000 3852.477 2568.000 2410.000 3202.000 2122.000 1566.000 8841.000 8176.000 74.000 3834.286 6847.427
 10
8003.867 4368.000 2243.000 3340.287 5384.000 1036.456 3506.000 4463.000 1477.000 2420.314 9391.000 1696.000 5857.833 244.000 8220.000 5879.000 5424.482 2631.197 7111.000 9157.536
 1
0.001 0.001
 9
5528.947 205.031 5245.169 8832.592 385.656 7126.360 3988.000 9542.000 3044.042 5288.000 9342.837 9979.021 7096.022 5159.200 9400.485 4996.735 1698.000 5403.939
 2
950.335 8019.000 3179.000 9482.000
 5
4103.449 6413.000 1796.581 3486.000 9011.000 5564.010 9044.000 5922.539 3350.000 3746.191
 3
0.900 0.900 0.900 0.900 0.900 0.000
 2
0.100 0.100 0.100 0.100
 1
6418.000 157.000
 5
4103.000 6413.459 1796.000 3486.000 9011.000 5564.000 9044.000 5922.539 3350.039 3746.000

0.250
 0.279
 0.472
 0.700
 0.388
 0.184
 0.451
 1.996
 0.609
 0.655
 0.316
 0.373
 0.119
 0.325
 1.994
 0.192
 0.800
 4.990
 0.035
 0.360
 1.200
 0.096
 0.497
 0.156
 0.466
 0.198
 0.014
 8.000
 0.362
 1.996
 0.000
 0.189
 0.028
 0.998
 0.036
 0.335
 0.230
 1.500
 1.600
 0.000
 0.037
