This is a connected components problem. You need to find all islands (connected components of s) and track the largest one.
DFS or BFS from each unvisited land cell explores the entire island. The question is: how do you avoid counting the same cell twice across different traversals?