{"trustable":false,"sections":[{"title":"","value":{"format":"PLAIN","content":"Jack and Jill have decided to sell\nsome of their Compact Discs, while\nthey still have some value. They\nhave decided to sell one of each of\nthe CD titles that they both own.\nHow many CDs can Jack and Jill\nsell?\nNeither Jack nor Jill owns more\nthan one copy of each CD."}},{"title":"Input","value":{"format":"PLAIN","content":"The input consists of a sequence of\ntest cases. The first line of each\ntest case contains two non-negative\nintegers N and M, each at most\none million, specifying the number\nof CDs owned by Jack and by Jill, respectively. This line is followed by N lines listing the catalog\nnumbers of the CDs owned by Jack in increasing order, and M more lines listing the catalog numbers\nof the CDs owned by Jill in increasing order. Each catalog number is a positive integer no greater than\none billion. The input is terminated by a line containing two zeros. This last line is not a test case and\nshould not be processed."}},{"title":"Output","value":{"format":"PLAIN","content":"For each test case, output a line containing one integer, the number of CDs that Jack and Jill both\nown"}},{"title":"Sample Input","value":{"format":"PLAIN","content":"3 3\n1\n2\n3\n1\n2\n4\n0 0"}},{"title":"Sample Output","value":{"format":"PLAIN","content":"2"}}]}