s=input("Enter the string to be encrypted:")
shift=int(input("Enter the shift amount:"))
s1=""
for i in s :
	if i==' ' :
		s1=s1+i
	elif i.isupper():	 
		s1=s1+ chr(int(ord(i)+shift-65)%26+65)
	else:
		s1=s1+chr(int(ord(i)+shift-97)%26+97)
print(s1)