{"problem":{"name":"^{-1}","description":{"content":"You are given a sequence $P$ that is a permutation of $(1,2,…,N)$, and an integer $X$. The $i$\\-th term of $P$ has a value of $P_i$. Print $k$ such that $P_k = X$.","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc277_a"},"statements":[{"statement_type":"Markdown","content":"You are given a sequence $P$ that is a permutation of $(1,2,…,N)$, and an integer $X$. The $i$\\-th term of $P$ has a value of $P_i$. Print $k$ such that $P_k = X$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 100$\n*   $1 \\leq X \\leq N$\n*   $P$ is a permutation of $(1,2,…,N)$.\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $X$\n$P_1$ $P_2$ $\\ldots$ $P_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc277_a","tags":[],"sample_group":[["4 3\n2 3 1 4","2\n\nWe have $P = (2,3,1,4)$, so $P_2 = 3$. Thus, you should print $2$."],["5 2\n3 5 1 4 2","5"],["6 6\n1 2 3 4 5 6","6"]],"created_at":"2026-03-03 11:01:13"}}