#include<iostream>
using namespace std;
int main(){
int m,n=0;
cin >> m;
char str[100], ch;
while (m) {
str[n] = cin.get();
n++;
m--;
}
for (int i = 0; i < m; i++)cout << str[i];
int n;
cin >> n;
for (int i = 0; i < m; i++)
if (str[i] == n)cout << i + 1 << endl;
return 0;
}