void main()
{
  char xiao[50],da[50];
	int i,j,k,l,m,Z,s,n,lenx,lend;
	int p;
	scanf("%s %s",xiao,da);
	p=strstr(da,xiao)-da;
printf("%d",p);
  
}
