Why is my code not passing all test cases?

@Harshit-Jha-2364832040305354
try to debug your code for the test input
5
23572
correct ans: 5
you get 4