{"raw_statement":[{"iden":"statement","content":"There are _n_ workers in a company, each of them has a unique id from 1 to _n_. **Exaclty** one of them is a chief, his id is _s_. Each worker except the chief has exactly one immediate superior.\n\nThere was a request to each of the workers to tell how how many superiors (not only immediate). Worker's superiors are his immediate superior, the immediate superior of the his immediate superior, and so on. For example, if there are three workers in the company, from which the first is the chief, the second worker's immediate superior is the first, the third worker's immediate superior is the second, then the third worker has two superiors, one of them is immediate and one not immediate. The chief is a superior to all the workers except himself.\n\nSome of the workers were in a hurry and made a mistake. You are to find the minimum number of workers that could make a mistake."},{"iden":"input","content":"The first line contains two positive integers _n_ and _s_ (1 ≤ _n_ ≤ 2·105, 1 ≤ _s_ ≤ _n_) — the number of workers and the id of the chief.\n\nThe second line contains _n_ integers _a_1, _a_2, ..., _a__n_ (0 ≤ _a__i_ ≤ _n_ - 1), where _a__i_ is the number of superiors (not only immediate) the worker with id _i_ reported about."},{"iden":"output","content":"Print the minimum number of workers that could make a mistake."},{"iden":"examples","content":"Input\n\n3 2\n2 0 2\n\nOutput\n\n1\n\nInput\n\n5 3\n1 0 0 4 1\n\nOutput\n\n2"},{"iden":"note","content":"In the first example it is possible that only the first worker made a mistake. Then:\n\n*   the immediate superior of the first worker is the second worker,\n*   the immediate superior of the third worker is the first worker,\n*   the second worker is the chief."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}