def get_svd_index(H, W, compress_rate):
    """
    (1-c) = (2*H*index + index) / H * W
    (1-c) = (2*H + 1) * index / H * W
    index = (1-c) * H * W / (2*H + 1)
    """
    if compress_rate > 100:
        return min(H, W)
    c = compress_rate / 100
    index = int((1 - c) * H * W / (2 * H + 1))
    return index