str=input("enter a string :")
shift=int(input("enter the value of the shift amount"))
s=""
for i in str:
	if i==' ':
		s=s+i
	elif i.isupper():
		s=s+chr(int(ord(i)+shift-65)%26+65)
	else:
		s=s+chr(int(ord(i)+shift-97)%26+97)
print(s)