Anya and Kirill are doing a physics laboratory work. In one of the tasks they have to measure some value *n* times, and then compute the average value to lower the error.

Kirill has already made his measurements, and has got the following integer values: *x*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub>, ..., *x*<sub class="lower-index">*n*</sub>. It is important that the values are close to each other, namely, the difference between the maximum value and the minimum value is at most 2.

Anya does not want to make the measurements, however, she can't just copy the values from Kirill's work, because the error of each measurement is a random value, and this coincidence will be noted by the teacher. Anya wants to write such integer values *y*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">2</sub>, ..., *y*<sub class="lower-index">*n*</sub> in her work, that the following conditions are met:
 -  the average value of *x*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub>, ..., *x*<sub class="lower-index">*n*</sub> is equal to the average value of *y*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">2</sub>, ..., *y*<sub class="lower-index">*n*</sub>;-  all Anya's measurements are in the same bounds as all Kirill's measurements, that is, the maximum value among Anya's values is not greater than the maximum value among Kirill's values, and the minimum value among Anya's values is not less than the minimum value among Kirill's values;-  the number of equal measurements in Anya's work and Kirill's work is as small as possible among options with the previous conditions met. Formally, the teacher goes through all Anya's values one by one, if there is equal value in Kirill's work and it is not strike off yet, he strikes off this Anya's value and one of equal values in Kirill's work. The number of equal measurements is then the total number of strike off values in Anya's work. 
Help Anya to write such a set of measurements that the conditions above are met.
The first line contains a single integer *n* (1 ≤ *n* ≤ 100 000) — the numeber of measurements made by Kirill.

The second line contains a sequence of integers *x*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub>, ..., *x*<sub class="lower-index">*n*</sub> ( - 100 000 ≤ *x*<sub class="lower-index">*i*</sub> ≤ 100 000) — the measurements made by Kirill. It is guaranteed that the difference between the maximum and minimum values among values *x*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub>, ..., *x*<sub class="lower-index">*n*</sub> does not exceed 2.
In the first example Anya can write zeros as here measurements results. The average value is then equal to the average value of Kirill's values, and there are only two equal measurements.

In the second example Anya should write two values 100 and one value 101 (in any order), because it is the only possibility to make the average be the equal to the average of Kirill's values. Thus, all three measurements are equal.

In the third example the number of equal measurements is 5.
6
-1 1 1 0 0 -1
2
0 0 0 0 0 0 
3
100 100 101
3
101 100 100 
7
-10 -9 -10 -8 -10 -9 -9
5
-10 -10 -9 -9 -9 -9 -9 
60
-8536 -8536 -8536 -8535 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8535 -8536 -8535 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8535 -8536 -8536 -8535 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8535 -8536 -8536 -8536 -8535 -8535 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8535
60
-8535 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8535 -8535 -8536 -8536 -8536 -8535 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8535 -8536 -8536 -8535 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8535 -8536 -8535 -8536 -8536 -8536 -8536 -8536 -8536 -8536 -8535 -8536 -8536 -8536 
9
-71360 -71359 -71360 -71360 -71359 -71359 -71359 -71359 -71359
9
-71359 -71359 -71359 -71359 -71359 -71360 -71360 -71359 -71360 
10
100 100 100 100 100 100 100 100 100 100
10
100 100 100 100 100 100 100 100 100 100 
100
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
100
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
5
-399 -399 -400 -399 -400
5
-400 -399 -400 -399 -399 
10
1001 1000 1000 1001 1000 1000 1001 1001 1000 1001
10
1001 1000 1001 1001 1000 1000 1001 1000 1000 1001 
20
-100000 -99999 -100000 -99999 -99999 -100000 -99999 -100000 -99999 -100000 -99999 -99999 -99999 -100000 -100000 -99999 -100000 -100000 -100000 -99999
20
-99999 -100000 -100000 -100000 -99999 -100000 -100000 -99999 -99999 -99999 -100000 -99999 -100000 -99999 -100000 -99999 -99999 -100000 -99999 -100000 
50
99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 100000 99999 99999 99999 99999 99999 100000 99999 99999 99999 100000 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 100000 99999 99999 99999 100000 99999 99999 99999
50
99999 99999 99999 100000 99999 99999 99999 100000 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 100000 99999 99999 99999 100000 99999 99999 99999 99999 99999 100000 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 99999 
100
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
100
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
1
-100000
1
-100000 
1
-1
1
-1 
1
0
1
0 
1
1
1
1 
1
100000
1
100000 
5
2 2 1 1 2
5
2 1 1 2 2 
10
0 -1 0 1 1 1 1 -1 0 0
6
0 0 0 0 0 0 0 0 1 1 
20
-4344 -4342 -4344 -4342 -4343 -4343 -4344 -4344 -4342 -4343 -4344 -4343 -4344 -4344 -4344 -4342 -4344 -4343 -4342 -4344
10
-4344 -4344 -4344 -4344 -4344 -4343 -4343 -4343 -4343 -4343 -4343 -4343 -4343 -4343 -4343 -4343 -4343 -4343 -4343 -4343 
40
113 113 112 112 112 112 112 112 112 112 112 113 113 112 113 112 113 112 112 112 111 112 112 113 112 112 112 112 112 112 112 112 113 112 113 112 112 113 112 113
12
111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 
5
-94523 -94523 -94523 -94524 -94524
5
-94524 -94524 -94523 -94523 -94523 
10
-35822 -35823 -35823 -35823 -35821 -35823 -35823 -35821 -35822 -35821
4
-35823 -35823 -35822 -35822 -35822 -35822 -35822 -35822 -35822 -35822 
11
-50353 -50353 -50353 -50353 -50353 -50352 -50353 -50353 -50353 -50353 -50352
11
-50352 -50353 -50353 -50353 -50353 -50352 -50353 -50353 -50353 -50353 -50353 
20
46795 46795 46795 46795 46795 46795 46795 46793 46794 46795 46794 46795 46795 46795 46795 46795 46795 46795 46795 46795
18
46794 46794 46794 46794 46795 46795 46795 46795 46795 46795 46795 46795 46795 46795 46795 46795 46795 46795 46795 46795 
40
72263 72261 72262 72263 72263 72263 72263 72263 72263 72262 72263 72263 72263 72263 72263 72262 72263 72262 72263 72262 72262 72263 72263 72262 72263 72263 72262 72262 72263 72262 72263 72263 72263 72263 72263 72263 72263 72263 72263 72262
30
72261 72261 72261 72261 72261 72261 72262 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 72263 
50
-46992 -46992 -46992 -46991 -46992 -46991 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46991 -46991 -46991 -46992 -46990 -46991 -46991 -46991 -46991 -46992 -46992 -46991 -46992 -46992 -46992 -46990 -46992 -46991 -46991 -46992 -46992 -46992 -46991 -46991 -46991 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992
36
-46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46992 -46991 -46990 -46990 -46990 -46990 -46990 -46990 -46990 -46990 -46990 
60
-86077 -86075 -86076 -86076 -86077 -86077 -86075 -86075 -86075 -86077 -86075 -86076 -86075 -86075 -86075 -86076 -86075 -86076 -86075 -86075 -86076 -86076 -86076 -86075 -86075 -86075 -86075 -86077 -86075 -86076 -86075 -86075 -86075 -86076 -86075 -86076 -86077 -86075 -86075 -86075 -86076 -86075 -86076 -86075 -86076 -86076 -86075 -86076 -86076 -86075 -86075 -86075 -86077 -86076 -86075 -86075 -86075 -86075 -86075 -86075
42
-86077 -86077 -86077 -86077 -86077 -86077 -86077 -86077 -86077 -86077 -86077 -86077 -86077 -86077 -86077 -86077 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 -86075 
70
-87 -86 -88 -86 -87 -86 -88 -88 -87 -86 -86 -88 -86 -86 -88 -87 -87 -87 -86 -87 -87 -87 -88 -88 -88 -87 -88 -87 -88 -87 -88 -86 -86 -86 -88 -86 -87 -87 -86 -86 -88 -86 -88 -87 -88 -87 -87 -86 -88 -87 -86 -88 -87 -86 -87 -87 -86 -88 -87 -86 -87 -88 -87 -88 -86 -87 -88 -88 -87 -87
28
-88 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 -87 
2
0 2
0
1 1 
4
1 1 3 3
0
2 2 2 2 
6
1 1 1 3 3 3
0
2 2 2 2 2 2 
2
1 3
0
2 2 
7
0 1 1 1 1 1 2
3
0 0 0 1 2 2 2 
6
1 1 1 -1 -1 -1
0
0 0 0 0 0 0 
3
1 1 3
1
1 2 2 
2
2 0
0
1 1 
10
1 3 3 3 3 3 3 3 3 3
8
2 2 3 3 3 3 3 3 3 3 
7
1 3 3 3 3 3 3
5
2 2 3 3 3 3 3 
7
1 2 2 2 2 2 3
3
1 1 1 2 3 3 3 
5
-8 -8 -8 -10 -10
1
-9 -9 -9 -9 -8 
3
1 2 3
1
2 2 2 
4
2 2 4 4
0
3 3 3 3 
4
1 1 -1 -1
0
0 0 0 0 
_ = input()
X = list(map(int, input().strip().split(' ')))

total = len(X)

dX = {}
for x in X:
    if x in dX:
        dX[x] += 1
    else:
        dX[x] = 1

minX=min(dX.keys())
maxX=max(dX.keys())

if maxX - minX == 2:
    midX = (maxX+minX)//2
    if min(dX[minX], dX[maxX]) >= dX[midX]//2: # cancel max/min
        rem = min(dX[minX], dX[maxX])
        dX[minX] -= rem
        dX[maxX] -= rem
        dX[midX] += rem*2
        strikeoff = total - rem*2
    else:   # cancel middle pairs
        rem = dX[midX]-dX[midX]%2
        dX[midX] -= rem
        dX[maxX] += rem//2
        dX[minX] += rem//2
        strikeoff = total - rem
# elif max(X) - min(X) == 1:
    # if dX[minX] >= dX[maxX]:
    #     rem = dX[minX]-dX[minX]%2
    #     dX[minX] -= rem
    #     dX[minX+1] += rem//2
    #     dX[minX-1] = rem//2
    # else:
    #     rem = dX[maxX]-dX[maxX]%2
    #     dX[maxX] -= rem
    #     dX[maxX+1] = rem//2
    #     dX[maxX-1] -= rem//2
    # strikeoff = total - rem
else:
    # rem = dX[minX]-dX[minX]%2
    # dX[minX] -= rem
    # dX[minX+1] = rem//2
    # dX[minX-1] = rem//2
    # strikeoff = total - rem
    strikeoff=total

print(strikeoff)
for k in dX.keys():
    for i in range(dX[k]):
        print(k, end=' ')
print()
