Ted (Josh Radnor) finally finishes telling his kids how he met their mother. (CBS)

About 15 minutes into Monday’s series finale of “How I Met Your Mother,” I finally figured out how the show was going to end. So when the big reveal came that — SPOILER ALERT — Ted meets the titular Mother, they fall in love, have kids, and then she dies, leaving 2030 Ted free to get back together with his ex-girlfriend Robin, I wasn’t exactly shocked.

And for the most part, the finale was a surprisingly funny, often fitting farewell to a show I’d stuck with (no matter how unfunny it got) for nearly a decade. It worked, even if the final scene undercuts the very mystery that had kept me watching.

“HIMYM” was supposed to shirk the sitcom conventions it ultimately succumbed to. Early on, Ted and Robin made for a compelling will they/won’t they coupling because we assumed they would never end up together. The show had a very specific moment it was building to. Instead, that moment was just an elaborate misdirection.

After trying early on to distance itself from “Friends,” “HIMYM” ended in almost the same way — with its long-suffering couple together in the end.

In 2012, I interviewed Josh Radnor, who played Ted, and he said, “I don’t think it matters” who the Mother is.

In the end, it truly didn’t.