from sys import stdin, stdout
import math
import string

s = stdin.readline()[:-1]
a = string.ascii_lowercase

res = set()

for x in a:
    for j in range(len(s)+1):
        k = s[:j] + x + s[j:]
        res.add(k)
print(len(res))

a=input()
ans=0
for i in range(len(a)+1):
    ans+=26
print(ans-len(a))

booklet = input()

print((25 * len(booklet)) + 26)

a = input()
print(26 * (len(a) + 1) - len(a))

n = input()
ans = 26;
for i in n:
    ans += 25
print(ans)

s = input()
print(26*(len(s)+1) - len(s))

LettersString = input("")
Alfabet = "abcdefghijklmnopqrstuvwxyz"
Combinaties = set()

for x in range(0,len(LettersString)+1):
    for y in range(0, 26):
        Combinaties.add(LettersString[0:x]+Alfabet[y]+LettersString[x:len(LettersString)])

print (len(Combinaties))

n = input()
ans = 26
q = 25
for i in range(len(n)):
    ans += q
print(ans)

if __name__ == '__main__':
    s = input()
    print(int((len(s) + 1) * 26 - len(s)))

S = input()
print(26 * (len(S)+1) -len(S) )

s = list(input())
print(26*(len(s)+1)-len(s))

n=input()
a=26
for i in range(len(n)):
	a+=25
print(a)

def GetDIstinctPhotos():
    n = raw_input()
    print 26*(len(n)+1) - len(n)

GetDIstinctPhotos()

import sys
from collections import Counter
from math import factorial

input = sys.stdin
output = sys.stdout

# input = open('input.txt')
# some changes

def read_int():
    return [int(x) for x in input.readline().rstrip().split()]

s = input.readline().rstrip()
spes = set()
for i in xrange(len(s) + 1):
    for c in 'abcdefghijklmnopqrstuvwxyz':
        spes.add(s[:i] + c + s[i:])
answer = len(spes)
output.write('%d\n' % answer)

s = list(input())
n = len(s)
def haz(a):
    a = a.copy()
    for i in range(len(a)):
        if a.count(a[i])>1:
            a[i] = 0
    return a
def ins(a,b):
    a = a.copy()
    d = a.copy()
    b = h(haz(b))
    b = b.copy()
    f = []
    for i in range(len(a)+1):
        for l in range(len(b)):
            a = d.copy()
            a.insert(i,b[l])
            f+=[a]
    return f
def h(a):
    i = 0
    a = a.copy()
    while 0 in a:
        a.remove(0)
    return a
k = (n+1)*26
f = ins(s,s)
b = len(f)
f = h(haz(f))
c = len(f)
k = k-(b-c)
print(k)

a = list(input())
k = set()
for i in range(len(a)+1):
    for l in range(ord("a"),ord("z")+1):
        t = a[:]
        t.insert(i,chr(l))
        k.add("".join(t))
print(len(k))

# -*- coding: utf-8 -*-
"""
Created on Wed Sep 30 15:37:38 2020

@author: PREET MODH
"""

s=list(input())
print(str(26 + len(s)*25))

a = input()
print((26*(len(a)+1))-len(a))

a=input()
c=0
for i in range(97,123):
	x=a.count(chr(i))
	if x>1:
	    c+=x-1

z=(26*(len(a)+1))-len(a)
print(z)

n = len(raw_input())

print (n + 1) * 26 - n

def from_same_letters(word):
	if len(word) == 0:
		return True

	char = word[0]

	for letter in word:
		if letter != char:
			return False

	return True

letters = input()
result = int(51)

for i in range(len(letters) - 1):
	result += 25;

	if letters[i + 1] != letters[i]:
		++result;

print(result)

import sys

def main():
    #grab input
    testVar = raw_input()
    length = len(testVar)+1
    print (26*length-len(testVar))

main()

# -*- coding:utf-8 -*-
import sys
import math

def some_func():
    """
    """

    n_list = map(str,sys.stdin.readline().split())[0]
    cache = {}

    for l in range(ord('a'),ord('z')+1):
        for k in range(len(n_list)+1):

            data = ''.join( [n_list[0:k],chr(l),n_list[k:]])
            cache[data]=1
    print len(cache)

if __name__ == '__main__':
    some_func()

s = raw_input()

q = set()

for i in xrange(len(s)+1):
       for j in xrange(97,123):
              q.add(s[:i]+chr(j)+s[i:])

print len(q)

s = raw_input()
l = len(s)
print l*25+26

n = len(raw_input())

print (n+1)*26 - n

s=raw_input().strip()
print (len(s)+1)*25 + 1

ins = raw_input()
lin = len(ins)
print (lin + 1) * 26  - (lin)

__author__ = 'trunghieu11'

from string import ascii_lowercase

def main():
    s = raw_input()
    books = set()
    for i in range(len(s) + 1):
        for c in ascii_lowercase:
            books.add(s[:i] + c + s[i:])
    print len(books)

if __name__ == '__main__':
    main()

case=raw_input()
n=len(case)
print 26*(n+1)-n

l = len(raw_input())
print (l + 1) * 26 - l

from sys import stdin
s=stdin.readline().rstrip("\n")
print (s.__len__()+1)*26-s.__len__()

s = input()
a2z = sorted("qwertyuiopasdfghjklzxcvbnm")
st = set()
for i in range(len(s)):
    first = s[:i]
    second = s[i:]
    for c in a2z:
        st.add(first + c + second)
for c in a2z:
    st.add(s + c)
print(len(st))

__author__ = 'vasiliy.lomanov'

s = raw_input()

length = len(s)
if length == 1:
    print(51)
    exit()

n = 51

prLetter = ''
for i in xrange(length-1):
    c = s[i]
    if c == prLetter:
        continue
    prLetter = c
    serieLen = 1
    k = i+1
    while c == s[k] and k < length-1:
        serieLen += 1
        k+=1

    n += (serieLen-1)*25

    n += 25

print(n)

ss = input()
print(26*(len(ss)+1)-len(ss))

s= str(input())
print((len(s)+1)*26 - len(s))

s=raw_input()
print len(set(s[:i]+j+s[i:] for i in range(len(s)+1) for j in 'abcdefghijklmnopqrstuvwxyz'))

s = raw_input()
s = list(s)
l = len(s)
ar = []

ls = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

for i in ls:
    for j in range(l+1):
        s.insert(j,i)
        temp = s[:]
        if s not in ar:
            ar.append(temp)
        del s[j]

print len(ar)

s=raw_input()
li=list(s)
li1=set(li)
s2=""
li1=list(li)
x=len(li)-len(li1)
for i in range(len(li1)):
    s2+=li1[i]
print (26*(len(s2)+1)-(len(s2))+x*25)

import math, string

s = raw_input()
a = [-1]
k = 0
for i in s:
    if a[k] == -1:
        prev = i
        a[k] = 1
    else:
        if i == prev:
            a[k] += 1
        else:
            k += 1
            a.append(1)
            prev = i
if k == 0:
    ans = (a[k]+1)*25 + 1
else:
    ans = 25
    for i in a:
        ans += i*25
    ans += 1

print ans

s = input()
d = set()
for i in range(ord('a'), ord('z') + 1):
    for j in range(len(s)+1):
        d.add(s[:j] + chr(i) + s[j:])
print(len(d))

# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

alpha = "abcdefghijklmnopqrstuvwxyz"

s = raw_input()
ans = set()
for c in alpha:
    for i in xrange(len(s) + 1):
        ans.add(s[:i] + c + s[i:])
print len(ans)

a=raw_input()
d={}
"""for c in a:
    if c in d:
        d[c]+=1
    else:
        d[c]=1
"""
print (len(a)+1)*25+1

'''

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.

'''
s=input()
n=len(s)
if(n>1):
    a=(26)*(n+1)-(n)
else:
    a=(26)*(n+1)-n
print(a)

#!/usr/bin/env python3

if __name__ == '__main__':
    s = input()
    print(26 + 26*len(s) - len(s))

alpha=[chr(x) for x in range(97,97+26)]
s=raw_input()
n=len(s)
photobooks=[]
for i in xrange(n+1):
    for j in alpha:
        t=s[:i]+str(j)+s[i:]
        photobooks.append(t)
photobooks=set(photobooks)
ans=len(photobooks)
print ans

s = input()
n = len(s)
ans = n * 25 + 26
print(ans)

s = raw_input()
print len(set([s[:x]+chr(i)+s[x:] for i in xrange(97, 123) for x in xrange(len(s)+1)]))

ent = raw_input()

res = (26 * (len(ent.strip())+1)) - len(ent.strip())

print res

s=input()
n=len(s)
ans=(n+1)*(26-n)
ans+=pow(n,2)
print(ans)

l = len(raw_input())

s = (l + 1) * 26 - l
print s

s=input()
n=len(s)+1
l=n-1
print(n*26-l)

chars = list(input())
l = len(chars)
print(26 * (l + 1) - l)

# KOYOYA AND PHOTOBOOKS
# Estacio Pereira, estacio.neto@ccc.ufcg.edu.br
# UFCG

l = list(raw_input())
j = 0
k = 0
v = []
result = 0
n = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range((len(l) + 1) * 26):
    l.insert(j / 26, n[k % 26])
    if not l in v:
        v.append(l[:])
        result += 1
    l.pop(j / 26)
    k += 1
    j += 1
print result

s = input()
a = []
for i in s:
    if i not in a:
        a.append(i)
print(len(s)*25+26)

s = input()
pos = len(s) + 1
print(26*(pos) - len(s))

s = raw_input()

q = list(s)

i = 1
c = s[0]
while i<len(s):
       if s[i]==s[i-1]:
              pass
       else:
              c+=s[i]
       i+=1

print 26*(len(c)+1)-len(c)

s = raw_input()

q = list(s)

q = set(q)
print 26*(len(q)+1)-len(q)

s = raw_input()
cnt = 1
for i in xrange(len(s)-1):
	if s[i] != s[i-1]:
		cnt += 1

print cnt*25 + 26

s = input()
a = []
for i in s:
    if not i in a:
        a.append(i)
print(26*(len(s)+1)+-len(a))

import itertools
s=input()
n=len(s)
s=''.join(ch for ch, _ in itertools.groupby(s))
print((n+1)*26-n-(n+1-len(s)))

import itertools
s=input()
n=len(s)
s=''.join(ch for ch, _ in itertools.groupby(s))
print((n+1)*26-n-(n-len(s)))

import itertools

def main():
    n = input()
    d = n[0]
    for c in n[1:]:
        if c==d[-1]:
            continue
        else:
            d+=c
    if len(d)==1:
        print(51)
    if len(d)>=2:
        print((len(d)+1)*26-2)

if __name__ == "__main__":
    main()

import itertools

def main():
    n = input()
    d = n[0]
    for c in n[1:]:
        if c==d[-1]:
            continue
        else:
            d+=c
    if len(d)==1:
        print(51)
    if len(d)>=2:
        print((len(d)+1)*26-len(d))

if __name__ == "__main__":
    main()

def photobooks(a):
    if a is None or len(a) == 0:
        return 0

    if len(a) % 2 == 0:
        return (len(a) + 1) * 25 + 1
    else:
        return (len(a) + 1) * 25 - 1

print(photobooks(str(input())))

l = input()
if (len(l) == 1):
	print(51)
else:
	r = 26
	for i in range(0,len(l)-1):
		if (l[i] != l[i+1]):
			r += 24
		else:
			r += 25
	r += 26
	print(r)

l = input()
if (len(l) == 1):
    print(51)
elif (len(l) == 2):
    print(76)
else:
    r = 26
    for i in range(0,len(l)-1):
        if (l[i] != l[i+1]):
            r += 24
        else:
            r += 25
    r += 26 if l[0] != l[i-1] else 25

    print(r)

s=input()
places=len(s)+1
print( ( (26-len(s) )*places )+len(s)*(places-2))

photobook = str(input())

letters = set(photobook)
print(26 * (len(photobook) +1) - len(letters))

# import sys
# sys.stdin=open("input1.in","r")
# sys.stdout=open("OUTPUX.out","w")
L=list(input())
S=set(L)
ans=((len(L)+1)*26)-len(S)
print(ans)

PRIME_COUNT = 10 ** 6
is_prime = [True] * PRIME_COUNT
primes = []
for i in range(2, 1000):
    if is_prime[i]:
        for j in range(i * i, PRIME_COUNT, i):
            is_prime[j] = False
for i in range(len(is_prime)):
    if is_prime[i]:
        primes.append(i)

photos = raw_input()
no_repeat = []

for i in photos:
    if not i in no_repeat:
        no_repeat.append(i)

result = 26 * (len(photos) + 1) - len(no_repeat)
print result

from string import ascii_lowercase

alphaList = list(ascii_lowercase)
ALPHALEN = 26
oString = raw_input()
oStringLen = len(oString)
resultList = set()

for i in range(oStringLen+1):
    for j in range(ALPHALEN):
	newString = oString[:i] + alphaList[j] + oString[i:]
	print newString
	resultList.add(newString)

print len(resultList)

__author__ = 'vasiliy.lomanov'

s = raw_input()

length = len(s)
if length == 1:
    print(51)
    exit()

n = 51

for i in xrange(length-1):
    c = s[i]
    serieLen = 1
    k = i+1
    while c == s[k] and k < length-1:
        serieLen += 1
        k+=1

    n += (serieLen-1)*25

    n += 25

print(n)

__author__ = 'vasiliy.lomanov'

s = raw_input()

length = len(s)
if length == 1:
    print(51)
    exit()

n = 52

for i in xrange(length-1):
    c = s[i]
    serieLen = 1
    k = i+1
    while c == s[k] and k < length-1:
        serieLen += 1
        k+=1

    n += (serieLen-1)*25

    n += 24

print(n)

__author__ = 'vasiliy.lomanov'

s = raw_input()

length = len(s)
if length == 1:
    print(51)
    exit()

n = 50

for i in xrange(length-1):
    c = s[i]
    serieLen = 1
    k = i+1
    while c == s[k] and k < length-1:
        serieLen += 1
        k+=1

    n += (serieLen-1)*25

    n += 24

print(n)

s = raw_input()
len1 = len(s)
a = []
a.extend(s)
af = []
for i in a:
    if i not in af:
        af.append(i)
len2 = len(af)
print ((len1+1)*26 - len2)

s=raw_input()
li=list(s)
li=set(li)
s2=""
li1=list(li)
x=len(li)-len(li)
for i in range(len(li1)):
    s2+=li1[i]
print (26*(len(s2)+1)-(len(s2))+x*25)

s=raw_input()
li=list(s)
li=set(li)
s2=""
li=list(li)
for i in range(len(li)):
    s2+=li[i]
print (26*(len(s2)+2)-(len(s2)))

s=raw_input()
li=list(s)
li=set(li)
s2=""
li=list(li)
for i in range(len(li)):
    s2+=li[i]
print (26*(len(s2)+1)-(len(s2)))

from math import factorial

s = raw_input()
s = list(s)

n1 = len(list(set(s)))
print (26 - n1)*(len(s)+1) + factorial(len(s) + 1)/(factorial(len(s) + 1 - n1)) - n1

from sys import stdin

string = stdin.readline()
print(len(string) * 26 - 1)

s = raw_input()
l = len(s)

print l * 25 + 1

#!/usr/bin/python

s = raw_input()
if (len(s) < 27):
    n = len(s)
else: n = 26

sum = 26
alfa = 25

for x in range(0,n):
    sum += alfa
    alfa -= 1

if (n > 1):
    sum += 1
print sum

# KOYOYA AND PHOTOBOOKS
# Estacio Pereira, estacio.neto@ccc.ufcg.edu.br
# UFCG

l = list(raw_input())
j = 0
k = 0
v = []
result = 0
n = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range((len(l) + 1) * 26):
    l.insert(j / 26, n[k % 26])
    if not l in v:
        v.append(l[:])
        result += 1
    l.pop(0)
    k += 1
    j += 1
print result

# KOYOYA AND PHOTOBOOKS
# Estacio Pereira, estacio.neto@ccc.ufcg.edu.br
# UFCG

l = list(raw_input())
j = 0
k = 0
v = []
result = 0
n = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range((len(l) + 1) * 26):
    l.insert(j / 26, n[k % 26])
    if not l in v:
        v.append(l[:])
        result += 1
    l.pop(j / 26)
    k += 1
    j += 1
print v
print result

s = raw_input()
a = [0]*26
n = len(s)
for i in range(n):
	a[ord(s[i]) - ord('a')] = 1
t = sum(a)
unq = 26 - t
ans = unq*(n+1) + n*(t)
print ans

s = raw_input()
counts = {}

for letter in s:
	if letter not in counts.keys():
		counts[letter] = 1
	else:
		counts[letter] += 1

result = 26 * sum(counts.values()) + (26 - len(counts))

print(result)

#WA
s=list(raw_input())
l=len(s)
a=len(set(s))
z=(26-a)*(l+1)+(a-1)*2+a
print z

#WA
s=list(raw_input())
l=len(s)
aa=set(s)
a=len(aa)
z=(26-a)*(l+1)
for i in aa:
    p=[]
    for _ in xrange(l):
        k=s
        k.insert(_,i)
        "".join(k)
        if not k in p:
            z+=1
            p+=k
print z

s=list(raw_input())
l=len(s)
a=len(set(s))
z=(26-a)*(l+1)
if a==1:
    z+=1
else:
    z+=a*2
print z

inp=raw_input()

start=25*len(inp)+26
#hai
for _ in range(1, len(inp)-1):
    if(inp[_]!=inp[_+1]):
        start=start+1

print start

s = raw_input()
s = list(s)
l = len(s)
ar = []

ls = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

for i in ls:
    for j in range(l+1):
        s.insert(j,i)
        temp = s[:]
        if s not in ar:
            ar.append(temp)
        s.remove(i)

print len(ar)

a=raw_input()
d={}
for c in a:
    if c in d:
        d[c]+=1
    else:
        d[c]=1
print (len(d)+1)*25+1

letrasNoAlfabeto = 26

entrada = raw_input()

calculo = len(entrada) * letrasNoAlfabeto

print calculo - len(entrada)

def func(s):
    t = 26 # last position
    for i in xrange(len(s)):
        c = 25
        if i > 0 and s[i] == s[i-1]:
            c -= 1
        t += c
    if len(s) >= 2 and s[-1] == s[-2]:
        t -= 1
    return t

s = raw_input()
print func(s)

def func(s):
    if len(s) == 1: return 51
    t = 26 * 2
    for i in xrange(1, len(s)):
        c = 25
        if s[i] != s[i-1]: c = 24
        t += c
    return t

s = raw_input()
print func(s)

s = input()
if len(s) == 1: print(51)
elif len(s) == 2: print(76)
elif len(s) == 3: print(102)
else:
    print(26*2 + 25*2 + (len(s)-3) * 24)

s = input()
print((50 + (len(s)-1) * 26) if len(s) > 1 else 51)

s = input()
l = len(s)
d = 0
for i in range(l-1):
    if s[i] == s[i+1]:
        d += 1
print(25*l+26-d)

a=input()
ans=0
for i in range(len(a)):
    ans+=26
print(ans-len(a))

s = input()
res = 26
for i in range(len(s)):
    if i % 2 == 0:
        res += 25
    else:
        res += 26
print(res)

s = input()
ss = set(s)
pool = 26 - len(ss)
ans = pool * (len(s) + 1)
for e in ss:
    ans += 1
    for i in range(len(s) - 1):
        if s[i] != s:
            ans += 1

print(ans)

b = input()
a = len(b)
c = []
for x in range(len(b)+1):
  for i in range(ord('a'), ord('z') + 1):
    c.append(b[:x]+chr(i)+b[x:])
d = set(c)
if len(b) == 17:
    print(3)
print(len(d))

s = input()
l = list(s)
a = 'abcdefghijklmnopqrstuvwxyz'
for i in range(len(s)+1):
	for j in a:
		l.insert(i, j)
		print(len(l)-2*len(s))

# coding: utf-8

tam = len(input())

print(26*25*tam)

# import sys
# sys.stdin=open("input.in",'r')
# sys.stdout=open("output4.out",'w')
s=list(input())
x=set(s)
print((25*(len(x)+1))+1)

'''input
kgan
'''
i = input()
if len(i) == 1:
	print(51)
else:
	s, t = 50, 1
	for x in range(len(i)-1):
		if i[x] != i[x+1]:
			s += 25 + t
			t = 0
		else:
			s += 25
	print(s)

'''input
kgan
'''
i = input()
if len(i) == 1:
	print(51)
else:
	s, t = 50, 0
	for x in range(len(i)-1):
		if i[x] != i[x+1]:
			s += 25 + t
			t = [1, 0][t]
		else:
			s += 25
	print(s)

'''input
hi
'''
i = input()
if len(i) == 1:
	print(51)
else:
	s, t = 50, 1
	for x in range(len(i)-1):
		if i[x] != i[x+1]:
			s += 25 + t
			t = [1, 0][t]
		else:
			s += 25
	print(s)

s = set(input())
result = 26
for l in s:
  result += 25
print(result)

import sys
import math

#to read string
get_string = lambda: sys.stdin.readline().strip()
#to read list of integers
get_int_list = lambda: list( map(int,sys.stdin.readline().strip().split()) )
#to read non spaced string and elements are integers to list of int
get_intList_from_str = lambda: list(map(int,list(sys.stdin.readline().strip())))
#to read non spaced string and elements are character to list of character
get_charList_from_str = lambda: list(sys.stdin.readline().strip())
#get word sepetared list of character
get_char_list = lambda: sys.stdin.readline().strip().split()
#to read integers
get_int = lambda: int(sys.stdin.readline())
#to print faster
pt = lambda x: sys.stdout.write(str(x))

#--------------------------------WhiteHat010--------------------------------#
s = get_string()
l = len(s)-1

if l == 0:
    print(26+25)
else:
    print(l*24 + 26 + 26)

n = input()
ans = 26
q = 25
for i in range(len(n)):
    ans += q
    q-=1
print(ans)

from sys import stdin, stdout
a=len(stdin.readline())-1
#a=input()
if a==1:
    b3=51
else:
    b3=(a+1)*26-(a-1)*2
stdout.write(str(b3))
stdout.flush()

from sys import stdin, stdout
a=len(stdin.readline())
#a=input()
if a==1:
    b3=51
else:
    b3=(a+1)*26-(a-1)*2
stdout.write(str(b3))
stdout.flush()

s = list(input())
s = set(s)
print(26*(len(s)+1)-len(s))

s = input()
if len(s) == 1:
    print(51)
    quit()
d = set()
counter = 0
extra = 0
for i in range(len(s)-1):
    if s[i + 1] == s[i]:
        counter += 1
    # else:
    #     extra += counter
    #     counter = 0
    # extra += counter
# print(counter)
# print((len(s)+1) * 26)

print((len(s)+1) * 26 - counter - len(s))

n = set(input())
print((len(n)+1)*26-len(n))

a=input()
c=0
for i in range(97,123):
	x=a.count(chr(i))
	if x>1:
	    c+=x-1

z=(26*(len(a)+1))-len(a)-c
print(z)

a=input()
c=0
for i in range(97,123):
	x=a.count(chr(i))
	if x>1:
	    c+=x-1

z=(26*(len(a)+1))-len(a)-(c+1)
print(z)

'''input
hi
'''
s = raw_input()

ans = 0
if len(s) == 1:
	ans = 51
else:
	ans = 26 * len(s) + 24

print ans

s = raw_input()

print (len(s) + 1) * 26 - 1 - int(len(s) > 1)

s = input()
d = set()
for i in range(ord('a'), ord('z') + 1):
    for j in range(len(s)):
        d.add(s[:j] + chr(i) + s[j:])
print(len(d))

'''

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.

'''

s=input()
n=len(s)
if(n>1):
    a=(26-n)*(n+1)+(n*2)
else:
    a=(26-n)*(n+1)+1
print(a)

s=input()
n=len(s)+1
l=len(set(s))
print(n*26-l)

s = list(input())
n = len(s)-1
ans = 0
for i in range(len(s)+1):
    ans += 26-i
ans += n
print(ans)


# by the authority of GOD     author: manhar singh sachdev #

import os,sys
from io import BytesIO, IOBase
from collections import Counter

def main():
    mod = 10**9+7
    r,g = map(int,input().split())
    n = 1
    while r+g >= (n*(n+1))//2:
        n += 1
    n -= 1
    tot = n*(n+1)//2
    dp = [0]*(r+1)
    dp[0] = 1
    for i in range(1,n+1):
        for x in range(r-i,-1,-1):
            dp[i+x] += dp[x]
            dp[i+x] %= mod
    ans = 0
    for i,val in enumerate(dp):
        if tot-i <= g:
            ans += val
            ans %= mod
    print(ans)

#Fast IO Region
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == '__main__':
    main()

"""
#If FastIO not needed, used this and don't forget to strip
#import sys, math
#input = sys.stdin.readline
"""

import os
import sys
from io import BytesIO, IOBase
import heapq as h
import bisect

from types import GeneratorType
BUFSIZE = 8192
class SortedList:
    def __init__(self, iterable=[], _load=200):
        """Initialize sorted list instance."""
        values = sorted(iterable)
        self._len = _len = len(values)
        self._load = _load
        self._lists = _lists = [values[i:i + _load] for i in range(0, _len, _load)]
        self._list_lens = [len(_list) for _list in _lists]
        self._mins = [_list[0] for _list in _lists]
        self._fen_tree = []
        self._rebuild = True

    def _fen_build(self):
        """Build a fenwick tree instance."""
        self._fen_tree[:] = self._list_lens
        _fen_tree = self._fen_tree
        for i in range(len(_fen_tree)):
            if i | i + 1 < len(_fen_tree):
                _fen_tree[i | i + 1] += _fen_tree[i]
        self._rebuild = False

    def _fen_update(self, index, value):
        """Update `fen_tree[index] += value`."""
        if not self._rebuild:
            _fen_tree = self._fen_tree
            while index < len(_fen_tree):
                _fen_tree[index] += value
                index |= index + 1

    def _fen_query(self, end):
        """Return `sum(_fen_tree[:end])`."""
        if self._rebuild:
            self._fen_build()

        _fen_tree = self._fen_tree
        x = 0
        while end:
            x += _fen_tree[end - 1]
            end &= end - 1
        return x

    def _fen_findkth(self, k):
        """Return a pair of (the largest `idx` such that `sum(_fen_tree[:idx]) <= k`, `k - sum(_fen_tree[:idx])`)."""
        _list_lens = self._list_lens
        if k < _list_lens[0]:
            return 0, k
        if k >= self._len - _list_lens[-1]:
            return len(_list_lens) - 1, k + _list_lens[-1] - self._len
        if self._rebuild:
            self._fen_build()

        _fen_tree = self._fen_tree
        idx = -1
        for d in reversed(range(len(_fen_tree).bit_length())):
            right_idx = idx + (1 << d)
            if right_idx < len(_fen_tree) and k >= _fen_tree[right_idx]:
                idx = right_idx
                k -= _fen_tree[idx]
        return idx + 1, k

    def _delete(self, pos, idx):
        """Delete value at the given `(pos, idx)`."""
        _lists = self._lists
        _mins = self._mins
        _list_lens = self._list_lens

        self._len -= 1
        self._fen_update(pos, -1)
        del _lists[pos][idx]
        _list_lens[pos] -= 1

        if _list_lens[pos]:
            _mins[pos] = _lists[pos][0]
        else:
            del _lists[pos]
            del _list_lens[pos]
            del _mins[pos]
            self._rebuild = True

    def _loc_left(self, value):
        """Return an index pair that corresponds to the first position of `value` in the sorted list."""
        if not self._len:
            return 0, 0

        _lists = self._lists
        _mins = self._mins

        lo, pos = -1, len(_lists) - 1
        while lo + 1 < pos:
            mi = (lo + pos) >> 1
            if value <= _mins[mi]:
                pos = mi
            else:
                lo = mi

        if pos and value <= _lists[pos - 1][-1]:
            pos -= 1

        _list = _lists[pos]
        lo, idx = -1, len(_list)
        while lo + 1 < idx:
            mi = (lo + idx) >> 1
            if value <= _list[mi]:
                idx = mi
            else:
                lo = mi

        return pos, idx

    def _loc_right(self, value):
        """Return an index pair that corresponds to the last position of `value` in the sorted list."""
        if not self._len:
            return 0, 0

        _lists = self._lists
        _mins = self._mins

        pos, hi = 0, len(_lists)
        while pos + 1 < hi:
            mi = (pos + hi) >> 1
            if value < _mins[mi]:
                hi = mi
            else:
                pos = mi

        _list = _lists[pos]
        lo, idx = -1, len(_list)
        while lo + 1 < idx:
            mi = (lo + idx) >> 1
            if value < _list[mi]:
                idx = mi
            else:
                lo = mi

        return pos, idx

    def add(self, value):
        """Add `value` to sorted list."""
        _load = self._load
        _lists = self._lists
        _mins = self._mins
        _list_lens = self._list_lens

        self._len += 1
        if _lists:
            pos, idx = self._loc_right(value)
            self._fen_update(pos, 1)
            _list = _lists[pos]
            _list.insert(idx, value)
            _list_lens[pos] += 1
            _mins[pos] = _list[0]
            if _load + _load < len(_list):
                _lists.insert(pos + 1, _list[_load:])
                _list_lens.insert(pos + 1, len(_list) - _load)
                _mins.insert(pos + 1, _list[_load])
                _list_lens[pos] = _load
                del _list[_load:]
                self._rebuild = True
        else:
            _lists.append([value])
            _mins.append(value)
            _list_lens.append(1)
            self._rebuild = True

    def discard(self, value):
        """Remove `value` from sorted list if it is a member."""
        _lists = self._lists
        if _lists:
            pos, idx = self._loc_right(value)
            if idx and _lists[pos][idx - 1] == value:
                self._delete(pos, idx - 1)

    def remove(self, value):
        """Remove `value` from sorted list; `value` must be a member."""
        _len = self._len
        self.discard(value)
        if _len == self._len:
            raise ValueError('{0!r} not in list'.format(value))

    def pop(self, index=-1):
        """Remove and return value at `index` in sorted list."""
        pos, idx = self._fen_findkth(self._len + index if index < 0 else index)
        value = self._lists[pos][idx]
        self._delete(pos, idx)
        return value

    def bisect_left(self, value):
        """Return the first index to insert `value` in the sorted list."""
        pos, idx = self._loc_left(value)
        return self._fen_query(pos) + idx

    def bisect_right(self, value):
        """Return the last index to insert `value` in the sorted list."""
        pos, idx = self._loc_right(value)
        return self._fen_query(pos) + idx

    def count(self, value):
        """Return number of occurrences of `value` in the sorted list."""
        return self.bisect_right(value) - self.bisect_left(value)

    def __len__(self):
        """Return the size of the sorted list."""
        return self._len

    def __getitem__(self, index):
        """Lookup value at `index` in sorted list."""
        pos, idx = self._fen_findkth(self._len + index if index < 0 else index)
        return self._lists[pos][idx]

    def __delitem__(self, index):
        """Remove value at `index` from sorted list."""
        pos, idx = self._fen_findkth(self._len + index if index < 0 else index)
        self._delete(pos, idx)

    def __contains__(self, value):
        """Return true if `value` is an element of the sorted list."""
        _lists = self._lists
        if _lists:
            pos, idx = self._loc_left(value)
            return idx < len(_lists[pos]) and _lists[pos][idx] == value
        return False

    def __iter__(self):
        """Return an iterator over the sorted list."""
        return (value for _list in self._lists for value in _list)

    def __reversed__(self):
        """Return a reverse iterator over the sorted list."""
        return (value for _list in reversed(self._lists) for value in reversed(_list))

    def __repr__(self):
        """Return string representation of sorted list."""
        return 'SortedList({0})'.format(list(self))

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        import os
        self.os = os
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            self.os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

import collections as col
import math, string

def getInts():
    return [int(s) for s in input().split()]

def getInt():
    return int(input())

def getStrs():
    return [s for s in input().split()]

def getStr():
    return input()

def listStr():
    return list(input())

MOD = 10**9+7
mod=10**9+7
#t=int(input())
t=1
p=10**9+7
def ncr_util():

    inv[0]=inv[1]=1
    fact[0]=fact[1]=1
    for i in range(2,300001):
        inv[i]=(inv[i%p]*(p-p//i))%p
    for i in range(1,300001):
        inv[i]=(inv[i-1]*inv[i])%p
        fact[i]=(fact[i-1]*i)%p

def solve():
    h=0
    for i in range(1000):
        if  (i*(i+1))//2<=(r+g):
            h=i
    dp=[0]*(r+1)
    dp[0]=1
    #print(h)
    for i in range(1,h+1):
        curr=(i*(i+1))//2
        for j in range(r,-1,-1):
            if j-i>=0 :
                dp[j]=(dp[j]%mod+dp[j-i]%mod)%mod
    tot=(h*(h+1))//2
    ans=0
    for i in range(r+1):
        if tot-i<=g:
            ans=(ans%mod+dp[i]%mod)%mod
    return ans
for _ in range(t):
    #n=int(input())
    #n=int(input())
    #n,m=(map(int,input().split()))
    #n1=n
    #x=int(input())
    #b=int(input())
    #n,m,k=map(int,input().split())
    r,g=map(int,input().split())
    #n=int(input())
    #s=input()
    #s1=input()
    #p=input()
    #l=list(map(int,input().split()))

    #l.sort()
    #l.sort(revrese=True)
    #l2=list(map(int,input().split()))
    #l=str(n)
    #l.sort(reverse=True)
    #l2.sort(reverse=True)
    #l1.sort(reverse=True)
    print(solve())