Well, first of all, if the ramps are perfectly frictionless, then the ball won't roll ... it'll slide. Kind of like a bowling ball does at the beginning of a shiny, highly-waxed lane. You need friction against the ball to roll it.
But in any case, no matter what the slopes of the ramps are, even if they have different slopes, the ball will rise on the second ramp to the same height from which it was released on the first ramp.