P26878 [AtCoder] Attendance Confirmation
普及
题目描述

Problem Description

This year's study camp has four external instructors participating.

Penguin-kun, the head of operations, wants to know how many instructors will attend all the days of the camp.

The study camp this year consists of four days. The $i$-th instructor will attend the $j$-th day of the camp if the $j$-th character of the string $S_i$ is 1, and will be absent if it is 0. There are no considerations for late arrivals or early departures.

Please count the number of instructors who will attend all the days of the camp on behalf of Penguin-kun.

Input Format

The input is given from the standard input in the following format:

$ S_1 $ $ S_2 $ $ S_3 $ $ S_4 $

Output Format

Output the number of instructors who will attend all the days of the camp.

Sample Input and Output

Sample Input #1

1111
0101
0000
1111

Sample Output #1

2

Sample Input #2

1111
1111
1111
1111

Sample Output #2

4

Sample Input #3

0010
1000
0110
0010

Sample Output #3

0

Notes/Hints

Constraints

  • $S_i\ (1\ \leq\ i\ \leq\ 4)$ is a string of length 4 consisting only of 0 and 1.

Subtasks

There are no subtasks for this problem.

Sample Explanation 1

The $1$-st and $4$-th instructors will attend all the days of the camp.

Sample Explanation 2

All instructors will attend all the days of the camp.

Sample Explanation 3

No instructor will attend all the days of the camp.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1111 0101 0000 1111
样例输出
2