import java.util.*;
import java.util.stream.*;
class Ideone {
public static void main
(String[] args
) { int[] sequence = {1, 3, 2, 4, 3, 5, 4, 6, 1, 3};
List<Integer> list = new ArrayList<>();
IntStream.of(sequence).forEach(list::add);
int index = list.subList(1, list.size()).indexOf(sequence[0]) + 1;
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS51dGlsLnN0cmVhbS4qOwpjbGFzcyBJZGVvbmUgewpwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgewogICAgaW50W10gc2VxdWVuY2UgPSB7MSwgMywgMiwgNCwgMywgNSwgNCwgNiwgMSwgM307CiAgICBMaXN0PEludGVnZXI+IGxpc3QgPSBuZXcgQXJyYXlMaXN0PD4oKTsKICAgIEludFN0cmVhbS5vZihzZXF1ZW5jZSkuZm9yRWFjaChsaXN0OjphZGQpOwogICAgaW50IGluZGV4ID0gbGlzdC5zdWJMaXN0KDEsIGxpc3Quc2l6ZSgpKS5pbmRleE9mKHNlcXVlbmNlWzBdKSArIDE7CiAgICBTeXN0ZW0ub3V0LnByaW50bG4oaW5kZXgpOwoJCn0KfQ==