Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/case-telefon-tugmalari

Phone keypad

Easy 1000 ms 64 MB 22%
Share

On a push-button phone, the Latin letters are placed on the digit keys like this:

Key Letters
2 a, b, c
3 d, e, f
4 g, h, i
5 j, k, l
6 m, n, o
7 p, q, r, s
8 t, u, v
9 w, x, y, z

A lowercase Latin letter $c$ is given. Find which key it is on.

Phone keypad keys and how the letters are placed on them

Input

One lowercase Latin letter $c$.

Output

One integer — the key number (from $2$ to $9$).

Note

$c$ is a lowercase Latin letter from a to z

Examples

Input #1
a
Output #1
2
Input #2
s
Output #2
7

Sign in to submit a solution

Signing up is free and takes a minute.