Ding! The “fasten seat belt” signs have turned on. Time to find your seat.

It’s a completely full flight, so your seat should be the only missing boarding pass in your list. However, there’s a catch: some of the seats at the very front and back of the plane don’t exist on this aircraft, so they’ll be missing from your list as well.

Your seat wasn’t at the very front or back, though; the seats with IDs +1 and -1 from yours will be in your list.

Assignment

What is the ID of your seat? Determine this in the following way:

Example

In this interactive session we assume the text file boarding_list.txt1 to be located in the current directory.

> row("FBFBBFFRLR")
44
> row("BFFFBBFRRR")
70
> row("FFFBBBFRRR")
14
> row("BBFFBBFRLL")
102

> column("FBFBBFFRLR")
5
> column("BFFFBBFRRR")
7
> column("FFFBBBFRRR")
7
> column("BBFFBBFRLL")
4

> seat_id("FBFBBFFRLR")
357
> seat_id("BFFFBBFRRR")
567
> seat_id("FFFBBBFRRR")
119
> seat_id("BBFFBBFRLL")
820

> missing_seat_id("boarding_list.txt")
658