Have you ever been a part of the exciting game Passing the Parcel ? Sid is on a school picnic with his classmates. The teacher decides to make the whole class play the game of Passing the Parcel. Since the winner of the game gets lots of chocolates and ice cream as his/her prize, all the students are over-excited about the game, including Sid. Here are the rules of the game:
Given N the number of students in the class and the lyrics of the song, you have to find out the roll number of the student who wins the game.
Input :
The input consists of 2 lines. The first line consists of N, the number of students in the class. The next line consists of a string denoting the lyrics of the song the teacher plays.
Output :
Print a single integer denoting the roll number of the student who wins the game.
Constraints :
\(2 \le N \le 1000\)
\(1 \le |S| \le 1000\), where |S| denotes the length of the input string. It is guaranteed that at least 1 lyric in the song will be a 'b'
a : \(1 -> 2\) b : 2 goes out, handing over the parcel to 3 b : 3 goes out, handing over the parcel to 4 a : \(4 -> 5\) a : \(5 -> 6\) b : 6 goes out, handing over the parcel to 1 b : 1 goes out, handing over the parcel to 4 a : \(4 -> 5\) a : \(5 -> 4\) b : 4 goes out
Hence winner is 5.