{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"MD","content":"Faria,Roja and Ryaan are very close friends.They are like sisters.\nRoja and Ryaan wants to give faria something unique on her birthday.\nThey know Faria can eat grapes all day long.But giving her grapes will\nbe a normal birthday gift .so they planned that they won\u0027t give faria grapes\nthat easily.They created a treasure hunt contest for her.Lets see what \nactually it is!\nOn her birthday day, Faria found n treasure chests and m keys. The i-th chest has an integer a\u003csub\u003ei\u003c/sub\u003e written on it and the j-th key has an integer b\u003csub\u003ej\u003c/sub\u003e on it. Faria knows those chests contain the powerful mysterious green Grapes, thus Faria wants to open as many treasure chests as possible.\n\nThe j-th key can be used to unlock the i-th chest if and only if the sum of the key number and the chest number is an odd number. Formally, a\u003csub\u003ei\u003c/sub\u003e+ b\u003csub\u003ej\u003c/sub\u003e≡1(mod2). One key can be used to open at most one chest, and one chest can be opened at most once.\n\nFind the maximum number of chests Faria can open."}},{"title":"Input","value":{"format":"MD","content":"Input\nThe first line contains integers n and m (1≤n,m≤10e5) — the number of chests and the number of keys.\n\nThe second line contains n integers a1,a2,…,an (1≤ai≤10e9) — the numbers written on the treasure chests.\n\nThe third line contains m integers b1,b2,…,bm (1≤bi≤10e9) — the numbers written on the keys."}},{"title":"Output","value":{"format":"MD","content":"Output\nPrint the maximum number of chests Faria can open.\n"}},{"title":"Examples","value":{"format":"MD","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e5 4\n9 14 6 2 11\n8 4 7 20\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e3\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e5 1\n2 4 6 8 10\n5\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e1\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e1 4\n10\n20 30 40 50\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e0\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"MD","content":"Note\nIn the first example, one possible way to unlock 3 chests is as follows:\n\nUse first key to unlock the fifth chest,\nUse third key to unlock the second chest,\nUse fourth key to unlock the first chest.\nIn the second example, Faria can use the only key to unlock any single chest (note that one key can\u0027t be used twice).\n\nIn the third example, no key can unlock the given chest. "}}]}