Time limit
2s
Memory limit
128 MB
Electronic devices contain resistors. A resistor is marked with three colors, and those colors determine its resistance in ohms. The first two colors form a two-digit value, and the third color gives the multiplier. Use the following table to interpret each color.
| Color | Value | Multiplier |
|---|---|---|
| black | 0 | 1 |
| brown | 1 | 10 |
| red | 2 | 100 |
| orange | 3 | 1,000 |
| yellow | 4 | 10,000 |
| green | 5 | 100,000 |
| blue | 6 | 1,000,000 |
| violet | 7 | 10,000,000 |
| grey | 8 | 100,000,000 |
| white | 9 | 1,000,000,000 |
The first line contains the first color, the second line contains the second color, and the third line contains the third color. Every input color appears in the table above.
Print the resistance value calculated from the three given colors.