This page is still under construction.

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

Easy-to-Solve Expressions

Time limit1sMemory limit1024 MB

Summary
Given three distinct integers, the task is to check whether one is the sum or the product of the other two, printing 1, 2, or 3.
Level

Easy1 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

People often wonder whether a set of numbers has a relationship among them. This task is easier when there are only three numbers.

You are given three distinct positive integers. If one of the three numbers is the sum of the other two, print 1. If one of them is the product of the other two, print 2. Otherwise, print 3. Exactly one of these three messages applies.

Input

There is one input line containing three distinct positive integers. Each integer is between 2 and 1000, inclusive.

Output

Print the message described above.

Examples3

  1. Example 1

    Input
    10 30 20
    
    Expected output
    1
    
  2. Example 2

    Input
    10 20 200
    
    Expected output
    2
    
  3. Example 3

    Input
    100 5 700
    
    Expected output
    3