There is a newly constructed building in New York city with N floors. There are M elevators available in the building, each of which connects two specific floors. Unfortunately, each elevator is not accessible on all the floors, meaning the elevators do not make any stops between the two specified floors.
You are given two arrays representing the starting and the ending floors of each elevator respectively. Using the elevators, you want to reach the highest floor you can in the building. Your task is to find and return the highest floor you can reach using the elevators.
Return an integer value representing the highest floor you can reach by using M elevators.