Occupy parking | 프로그래밍의 벗 PivotOJ
PivotOJ

Occupy parking

시간 제한: 2000ms메모리 제한: 512MB출처: CCC 2018 JuniorBOJ 16018

문제

You supervise a small parking lot which has N parking spaces.

Yesterday, you recorded which parking spaces were occupied by cars and which were empty.

Today, you recorded the same information.

How many of the parking spaces were occupied both yesterday and today?

입력

The first line of input contains the integer N (1 ≤ N ≤ 100). The second and third lines of input contain N characters each. The second line of input records the information about yesterday’s parking spaces, and the third line of input records the information about today’s parking spaces. Each of these 2N characters will either be C to indicate an occupied space or . to indicate it was an empty parking space.

출력

Output the number of parking spaces which were occupied yesterday and today.

예제

예제 1

입력
5
CC..C
.CC..
출력
1

예제 2

입력
7
CCCCCCC
C.C.C.C
출력
4
코드를 제출하려면 로그인하세요.