import java.util.Scanner;
import java.util.HashSet; // Set의 파생클래스
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
HashSet<Integer> h = new HashSet<Integer>();
// 중복되는 원소는 하나만 저장
// HashSet은 순서개념이 없다.
for(int i=0; i<10; i++) {
h.add(scan.nextInt()%42);
// h.add() : HashSet에 저장하는 메소드
}
scan.close();
System.out.println(h.size());
// h.size() : 저장되어 있는 원소의 개수
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
boolean[] arr = new boolean[42]; // boolean형 배열의 기본값은 false이다.
int count = 0;
for(int i=0; i<10; i++) {
arr[scan.nextInt()%42] = true;
// 42로 나눈 나머지에 해당하는 인덱스 번호에 true 대입
// 이 과정에서 중복된 나머지 값은 무시된다.
// (같은 인덱스 번호에 여러번 입력해도 결과는 true로 동일)
}
for(boolean b : arr) { // 향상된 for문
if(b == true) { // 배열 값이 true일 때마다
count += 1; // count = count + 1
}
}
System.out.print(count);
}
}