Finds the nth occurence of an inputted integer

given string of ints, input looks for nth occurrence of some integer x (n x)

output: index of occurrence