Length of smallest subarray with a sum greater than or equal to S