STOCK SPAN PROBLEM

THE SPAN OF 0TH INDEX SHOULD BE 0 ,???

no for the first input n array, we can take that 1 value so answer will be 1