線性搜索

Description

請撰寫一個程式,讓使用者輸入一個數列以及一個目標值,並且查找該目標值是否出現在數列中,若有則輸出索引值,反之則輸出-1。

Please write a program that allows the user to input a sequence and a target value, and find whether the target value appears in the sequence. If so, it will output the index value, otherwise it will output -1.

Input

輸入包含以下資訊:

The input contains the following information:

Output

請依照題目敘述進行輸出。

Please output according to the title description.

Sample Input 1

3 4
1 2 3

Sample Output 1

-1

Sample Input 2

5 10
77 50 10 364 123