This page is still under construction.

Parts of this page are still being built. What you see may change.

Identifying tea

Time limit3sMemory limit256 MB

Summary
Count how many of the five contestants guessed the given tea type correctly.
Level

Easy1 of 10

Topics
Implementation
Solved
No attempts yet

Problem

Blind tea tasting is the skill of identifying a tea using only smell and taste.

A local TV show is held as part of the Ideal Challenge of Pure-Tea Consumers (ICPC). The show prepares one full teapot and hands a cup of tea to each of five contestants. Every contestant smells the sample, tastes it, and decides which type of tea it is. The type is one of white tea (1), green tea (2), black tea (3), or herbal tea (4). At the end the answers are checked and the number of correct guesses is counted.

You are given the actual tea type and the answer each contestant gave. Determine how many contestants answered correctly.

Input

The first line contains an integer TT, the tea type (1≤T≤41 \le T \le 4).

The second line contains five integers AA, BB, CC, DD, EE separated by spaces, the answers given by the five contestants (1≤A,B,C,D,E≤41 \le A, B, C, D, E \le 4).

Output

Print one line with the number of contestants who answered correctly.

Examples2

  1. Example 1

    Input
    1
    1 2 3 2 1
    
    Expected output
    2
    
  2. Example 2

    Input
    3
    4 1 1 2 1
    
    Expected output
    0