```ts
export function stepBack(moves: string): number {
    let position = 0;
    
    for (const move of moves) {
        if (move === 'F') {
            position++;
        } else if (move === 'B') {
            position--;
        }
    }
    
    return Math.max(position, 0);
}
```