Type: Default 1000ms 256MiB

Dentist Aoki

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

Special for beginners, ^_^

Description

有一个长度为 n 的全 1 布尔数组。进行 q 次操作,每次给出整数 x ,取反数组的第 x 个元素。(取反就是原来是1,变成0,原来是0变成1)

所有操作结束后,求数组中有多少个元素为 1 。

Format

Input

第一行输入两个数:n和q 第二行q个数字,表示对第qi个数字进行取反.

Output

One integer, the sum of x and y.

Samples

30 6
2 9 18 27 18 9
28
1 7
1 1 1 1 1 1 1
0
9 20
9 5 1 2 2 2 8 9 2 1 6 2 6 5 8 7 8 5 9 8
5

Limitation

1 ≤ N,Q ≤ 1000

1 ≤ T i ≤ N

周末班结营考试

Not Attended
Status
Done
Rule
IOI
Problem
6
Start at
2025-1-11 14:30
End at
2025-1-11 16:30
Duration
2 hour(s)
Host
Partic.
14