```python
def find_remainder(arr, lens, n):
    """
    Calculates the remainder of the product of array elements divided by n.
    The product is calculated for the first 'lens' elements of the array.
    """
    remainder = 1
    for i in range(lens):
        remainder = (remainder * arr[i]) % n
    return remainder

```