Training Site
Sideways banner

Favourite Card

Input: Standard Input (stdin)
Output: Standard Output (stdout)
Memory limit: 16 megabytes
Time limit: 1.0 seconds

You've been given a new deck of cards for Christmas, with a massive amount of cards in the deck. Flipping through the cards, you decide on a favourite card.

ALL OF A SUDDEN a speeding tennis player knocks the entire deck of cards from your hands, sending your favourite card into the massive pile of cards. Luckily, you remember the cards number, and you sit down to write a program to find your card.

Given a list of numbers, and a number to be found, your job is to return where your favourite card is in the list of numbers.

Input Format

The first line will contain two integers, N (1 \le N \le 100), indicating how many cards there are in the deck, and S, the number of your favourite card.

Following that will be N lines, each containing a number c_i indicating which card is in the place in the stack of cards.

The stack of cards is numbered from 0 to N-1.

Output Format

Your program is to output a single number indicating where your favourite card is in the deck. That is, you need to output i where c_i is the favourite card number, S.

  • Sample Input 1

    10 62
    34
    28
    48
    62
    94
    56
    82
    94
    20
    10
    

    Sample Output 1

    3