#P9425. HDU 6761 Minimum Index

HDU 6761 Minimum Index

Description

给你一个字符串,求每个前缀的最小后缀对应的起始位置。

总的字符串长度 <= 2e7

Format

Input

Two integers x and y, satisfying 0x,y327670\leq x,y\leq 32767 .

Output

One integer, the sum of x and y.

Samples

1
aab
1238769