eolymp
bolt
Try our new interface for solving problems
Problems

Durak game

Durak game

Time limit 1 second
Memory limit 122 MiB

A prankster monkey, a donkey, a goat and a clubfooted bear started to play cards in a fool. As you know, the first starts in the game who has the trump card of the smallest dignity. Therefore, after the cards are dealt, all four simultaneously name the value of the smallest trump that they have, namely, each says a number from 6 to 14 or 0 (numbers more than 10 correspond to pictures: jack, lady, king and ace, zero - no trumps).

You know what numbers were said. Determine the number of guaranteedly lied in this company.

The game use a deck of 36 cards - 9 cards of each of 4 suits. Each player is dealt 6 cards, the next card from the deck is opened, and its suit becomes a trump for this game.

Input data

Four integers that players called. Each of the numbers is either 0, or a number from 6 to 14.

Output data

Print the minimum number of players who lied.

Examples

Input example #1
10 7 11 0
Output example #1
0
Input example #2
6 10 10 11
Output example #2
1