An strobogrammatic number is a number that reads the same when displayed upside down, that is, when rotated 180 degrees.
Although some people may find these numbers interesting, the truth is that they're highly dependent on the base and the symbols used when represented. In this occasion we'll be focusing only on numbers represented in a hexadecimal base. For the symbols, we will use the standard symbols used in calculators, these ones:
Your goal is to determine what is the minimum of digits that have to be changed for the number to be strobogrammatic.
You're given a non-negative hexadecimal number of at most $$$10^5$$$ digits consisting only of digits $$$\{0,1,2,3,4,5,6,7,8,9,A,b,C,d,E,F\}$$$.
Output the minimum number of changes you have to make to the number to make it strobogrammatic.
63181E9
0
4d75b4
5
| Название |
|---|


