import java.io.*;

public class IndexDemo
{
    
    public static void main(String[] args) throws IOException
    {
	BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
	    
	System.out.println("Enter the string to be searched:");
	String findIn = input.readLine();
	
	System.out.println();
	System.out.println("Enter substring to search for:");
	String find = input.readLine();

	int found = findIn.indexOf(find);

	System.out.println();
	
	if(found == -1)
	    {
		System.out.println("Substring not found");
	    }
	else
	    {
		System.out.println("Index is : " + found);
	    }
    }

}
