#include <cstdio>
using namespace std;
FILE*fin,*fout,*fans;
const int N=2e6+100;
long long a[N];
void work(){
	int n;
	fscanf(fin,"%d",&n);
	int m;
	fscanf(fout,"%d",&m);
	int isok;
	fscanf(fans,"%d",&isok);
	if(isok==-1){
		if(m!=-1){
			puts("0");
			return;
		}else{
			puts("100");
			return;
		}
	}
	for(int i=1;i<=n;i++){
		fscanf(fin,"%lld",a+i);
	}
	if(!(m>=1&&m<=n)){
		puts("0");
		return;
	}
	long long sum=0;
	for(int i=1;i<=m;i++){
		int index;
		fscanf(fout,"%d",&index);
		if(a[index]==-1e18){
			puts("0");
			return;
		}
		if(index>=1&&index<=n){
			sum+=a[index];
			a[index]=-1e18;
		}
	}
	if(sum%n==0){
		puts("100");
	}else puts("0");
}
int main(){
	fin=fopen("input","r");
	fout=fopen("user_out","r");
	fans=fopen("answer","r");
	work();
	fclose(fin);fclose(fout);fclose(fans);
}
