시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 22 10 7 43.750%

## 문제

Yes, we know . . . we’ve used Challenge 24 before for contest problems. In case you’ve never heard of Challenge 24 (or have a very short memory) the object of the game is to take 4 given numbers (the base values) and determine if there is a way to produce the value 24 from them using the four basic arithmetic operations (and parentheses if needed). For example, given the four base values 3 5 5 2, you can produce 24 in many ways. Two of them are: 5*5-3+2 and (3+5)*(5-2). Recall that multiplication and division have precedence over addition and subtraction, and that equal-precedence operators are evaluated left-to-right.

Two additional rules we’ll use: 1) you cannot use unary minus in any expression, so you can’t take the base values 3 5 5 2 and produce the expression -3+5*5+2, and 2) division can only be used if the result is an integer, so you can’t take the base values 2 3 4 9 and produce the expression 2/3*4*9.

Given a sequence of base values, determine the lowest graded expression resulting in the value 24. And by the way, the initial set of base values 3 5 5 2 has a grade 1 expression — can you find it?

## 입력

Input consists of a single line containing 4 base values. All base values are between 1 and 100, inclusive.

## 출력

Display the lowest grade possible using the sequence of base values. If it is not possible to produce 24, display impossible.

## 예제 입력 1

3 5 5 2


## 예제 출력 1

1


## 예제 입력 2

1 1 1 1


## 예제 출력 2

impossible