A. Kyoya and Photobooks
Kyoya Ootori is selling photobooks of the Ouran high School Host Club. He had photos, labeled "A" to "Z", and he had compiled them into a photo booklet with some photos in some order (Possib Ly with some photos being duplicated). A photo booklet can described as a string of lowercase letters, consisting of the photos in the booklet in order. He now wants to sell some ' special edition ' photobooks, each with one extra photo inserted anywhere in the book. He wants to make as many distinct photobooks as possible, so he can do more money. He asks Haruhi, how many distinct photobooks can he make by inserting one extra photo to the photobook he already has?
Haruhi solve this problem.
Input
The first line of input would be a single string s (1?≤?| S|? ≤?20). String s consists only of lowercase 中文版 letters.
Output
Output a single integer equal to the number of distinct photobooks Kyoya Ootori can make.
Sample Test (s) input
A
Output
51
Input
Hi
Output
76
Note
In the first case, we can make 'AB‘,‘AC‘,...,‘AZ‘,‘BA‘,‘CA‘,...,‘za', and 'AA', producing a total of distinct photo booklets.
#include <stdio.h> #include <string.h>int main () { char str[100]; int Len; scanf ("%s", str); len = strlen (str); printf ("%d\n", 26* (len+1)-len); return 0;}
A. Kyoya and Photobooks (codeforces Round #309 (Div. 2))