Tournament Format Synonyms I spent all of today at a Super Smash Bros. tournament, and I started thinking about some of the terminology we use when describing sets. These are the three kinds of sets that I see played at tournaments:


Best of 3 (Bo3)


Three games are played. The winner of the set is the player who won the majority of the games.
If a single player wins two games of the set, they are immediately declared the winner, because it would be impossible for the opponent to catch up.

Best of 5 (Bo5)


Five games are played. The winner of the set is the player who won the majority of the games.
If a single player wins three games of the set, they are immediately declared the winner, because it would be impossible for the opponent to catch up.

First to 5 (Ft5)


Okay, I cheated a bit with my wording earlier. This kind of set isn't part of a tournament, but you'll often see them happening in the venue. This is traditionally the kind of set you'll play if you've challenged another player and money is on the line.
It's as simple as it sounds: The players repeatedly play games until one of them has won five, and that player is declared the winner.



Obviously, Bo3 and Bo5 are very similar, differing only in the number of games played. But Ft5 is clearly different... right? Not really! No matter how a Bo3 set goes down, the winner will have won exactly two games. The winner of a Bo5 set will have won exactly 3 games. Why not call them Ft2, or Ft3? The same logic, applied in reverse, will show that Ft5 is exactly the same as Bo9.

The objective of this challenge is to determine the synonym of a set format.

Specification

Your program or function will take a single string from input. The first two characters will be Bo or Ft, and they will be followed by a number. The program/function will output a string with the opposite prefix and a number such that the input and output strings mean the same thing.

Any string beginning with Bo will end in an odd number.

You may assume that the number in the input string will never be greater than 200. You may also assume that you will never receive input for which the correct output would include a number greater than 200. Likewise, the input and correct output numbers will always be greater than 0.

Examples

Bo3 -&gt; Ft2
Ft2 -&gt; Bo3

Bo5 -&gt; Ft3
Ft3 -&gt; Bo5

Bo9 -&gt; Ft5
Ft5 -&gt; Bo9

Bo51 -&gt; Ft26
Ft26 -&gt; Bo51

Bo199 -&gt; Ft100
Ft100 -&gt; Bo199
Python 2, 59



lambda s:'FBto'[s&gt;'C'::2]+`eval(s[2:]+'/*22+-11'[s&gt;'C'::2])`


In short challenges where functions are allowed, the brevity of lambda usually wins out even when the code must repeat itself due to the inability to assign variables.

We check which case we're in with string comparison s&gt;'C'. Then, get the right prefix with the list slicing trick 'FBto'[s&gt;'C'::2]. 

To get the number, we must evaluate the characters beyond the second and do either *2+1 or /2-1 to it. We do this by tacking on either of those two expressions as strings, again chosen by list slicing, evaluating the result, and turning that number into a string.

Edit: Saved one char (59):

lambda s:eval("''FBto''++``%%ss/*22+-11``"[s&gt;'C'::2]%s[2:])


Don't even ask...