friend_num , stare_num, Hong_height =map(int,input().split()) Fheight_list = list(map(int,input().split())) stare_list = list(map(int,input().split())) Height_list = list(map(int,input().split())) total_height=[] for i in range(0,friend_num): friend_totall = stare_list[i] sum_Height = Fheight_list[i]+ Height_list[friend_totall-1] total_height.append(sum_Height) i+=1 Height_list.sort() Height_list.reverse() Hong_total = Height_list[0]+Hong_height count = 0 for i in total_height: if(i<Hong_total): count+=1 print(count)