This page is still under construction.

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

Sticks

Time limit1sMemory limit128 MB

Summary
Given three stick lengths, print 2 if they form an equilateral triangle, 1 if only a right triangle, and 0 otherwise.
Level

Easy1 of 10

Topics
Math, Geometry
Solved
No attempts yet

Problem

Bajtuś found 3 sticks in the forest. He now wants to know whether he can build a right triangle or an equilateral triangle out of them. Bajtuś cannot break the sticks; he may only use each stick whole.

Input

The first line contains three integers aa, bb, cc (1≤a,b,c≤10001 \le a, b, c \le 1000), the lengths of the first, second, and third stick respectively.

Output

Print a single integer: 00 if Bajtuś can build neither a right triangle nor an equilateral triangle, 11 if he can build only a right triangle, and 22 if he can build only an equilateral triangle.

Examples3

  1. Example 1

    Input
    3 4 5
    
    Expected output
    1
    
  2. Example 2

    Input
    5 5 5
    
    Expected output
    2
    
  3. Example 3

    Input
    2 3 4
    
    Expected output
    0