The cost of typing text on a phone's numeric keypad.

The cost is computed this way:
A letter which is on the first position on a phone key (e.g. A, D, G, etc) incurs a cost of 1;
A letter which is on the second position on a phone key (e.g. B, E, H, etc) has a cost of 2, and so on.
A sequence of two letters which are on the same key incurs an additional cost of 2 (same-key penalty).
Anything that is not a letter (e.g. numbers, punctuation) has a cost of 4.
This gives a rough indication of how hard it is to type the given text on a phone keypad.

Text

Cost