P12379 [AOJ] Bit String Reordering
普及
题目描述

Example

Input

6 3
1 0 0 1 0 1
1 3 2

Output

1

输入格式

见题面

输出格式

见题面

样例输入
6 3 1 0 0 1 0 1 1 3 2
样例输出
1