16. The frog jumps to the adjacent lily pad with each jump, taking 1 second per jump. The frog starts from lily pad A, jumps forward 3 times, then jumps backward 1 time, then jumps forward 3 times again, then jumps backward 1 time... Following this pattern, the frog takes $\qquad$ seconds to reach lily pad B for the first time.
$18$