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

~/algor $ cat problems/case-vaqt-birliklari

Units of time

Easy 1000 ms 64 MB 20%
Share

A time unit number $N$ and a number $T$ are given. Find how many seconds $T$ such units make. Units: $1$ — second, $2$ — minute ($60$ seconds), $3$ — hour ($60$ minutes), $4$ — day ($24$ hours), $5$ — week ($7$ days).

The numbers of the time units and the value of each in seconds

Input

One line with two integers: $N$ and $T$.

Output

One integer — the number of seconds.

Note

$1 \le N \le 5$
$0 \le T \le 10^{9}$

Examples

Input #1
3 2
Output #1
7200
Input #2
5 1
Output #2
604800

Sign in to submit a solution

Signing up is free and takes a minute.