s=str(input()) n=len(s) t=200 if 33<=len(s): t=400 k=0 for x in range(n): if ord(s[x])==45 or ord(s[x])==95 or 65<=ord(s[x])<=90 or 97<=ord(s[x])<=122 or 48<=ord(s[x])<=57: k=0 else: t=400 if ord(s[0])==45 or ord(s[0])==95: t=400 if ord(s[n-1])==45 or ord(s[n-1])==95: t=400 print(t)