Preparando MOJI

Tribonacci numbers

2000ms 65536K

Description:

Tribonacci numbers are a sequence of numbers, defined as follows:

  • t0 = t1 = 0,
  • t2 = 1,
  • ti = ti - 1 + ti - 2 + ti - 3.

You are given n; calculate n-th tribonacci number modulo 26.

Input:

The only line of input contains an integer n (1 ≤ n ≤ 1000).

Output:

Output n-th tribonacci number modulo 26.

Sample Input:

4

Sample Output:

2

Sample Input:

9

Sample Output:

18

Informação

Codeforces

Provedor Codeforces

Código CF130E

Tags

*special

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:33:40

Relacionados

Nada ainda