import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc.nextInt();
int m = sc.nextInt();
int x = sc.nextInt();
int leftFeeAreaCnt = 0;
int rightFeeAreaCnt = 0;
for (int i = 0; i < m; i++) {
int feeArea = sc.nextInt();
if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
}
}
if (leftFeeAreaCnt <= rightFeeAreaCnt) {
System.out.println(leftFeeAreaCnt);
} else {
System.out.println(rightFeeAreaCnt);
}
}
} import java.util.Scanner; Scanner java.util public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc.nextInt();
int m = sc.nextInt();
int x = sc.nextInt();
int leftFeeAreaCnt = 0;
int rightFeeAreaCnt = 0;
for (int i = 0; i < m; i++) {
int feeArea = sc.nextInt();
if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
}
}
if (leftFeeAreaCnt <= rightFeeAreaCnt) {
System.out.println(leftFeeAreaCnt);
} else {
System.out.println(rightFeeAreaCnt);
}
}
} Main public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc.nextInt();
int m = sc.nextInt();
int x = sc.nextInt();
int leftFeeAreaCnt = 0;
int rightFeeAreaCnt = 0;
for (int i = 0; i < m; i++) {
int feeArea = sc.nextInt();
if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
}
}
if (leftFeeAreaCnt <= rightFeeAreaCnt) {
System.out.println(leftFeeAreaCnt);
} else {
System.out.println(rightFeeAreaCnt);
}
} main {
Scanner sc = new Scanner(System.in);
sc.nextInt();
int m = sc.nextInt();
int x = sc.nextInt();
int leftFeeAreaCnt = 0;
int rightFeeAreaCnt = 0;
for (int i = 0; i < m; i++) {
int feeArea = sc.nextInt();
if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
}
}
if (leftFeeAreaCnt <= rightFeeAreaCnt) {
System.out.println(leftFeeAreaCnt);
} else {
System.out.println(rightFeeAreaCnt);
}
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int leftFeeAreaCnt = 0; leftFeeAreaCnt 0 int rightFeeAreaCnt = 0; rightFeeAreaCnt 0 for (int i = 0; i < m; i++) {
int feeArea = sc.nextInt();
if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
}
} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
int feeArea = sc.nextInt();
if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
}
} {
int feeArea = sc.nextInt();
if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
}
} int feeArea = sc.nextInt(); feeArea sc.nextInt() sc.nextInt sc if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
} feeArea < x feeArea x {
leftFeeAreaCnt++;
} leftFeeAreaCnt++ leftFeeAreaCnt if (x < feeArea) {
rightFeeAreaCnt++;
} x < feeArea x feeArea {
rightFeeAreaCnt++;
} rightFeeAreaCnt++ rightFeeAreaCnt if (leftFeeAreaCnt <= rightFeeAreaCnt) {
System.out.println(leftFeeAreaCnt);
} else {
System.out.println(rightFeeAreaCnt);
} leftFeeAreaCnt <= rightFeeAreaCnt leftFeeAreaCnt rightFeeAreaCnt {
System.out.println(leftFeeAreaCnt);
} System.out.println(leftFeeAreaCnt) System.out.println System.out System System.out leftFeeAreaCnt {
System.out.println(rightFeeAreaCnt);
} System.out.println(rightFeeAreaCnt) System.out.println System.out System System.out rightFeeAreaCnt String[] args args public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc.nextInt();
int m = sc.nextInt();
int x = sc.nextInt();
int leftFeeAreaCnt = 0;
int rightFeeAreaCnt = 0;
for (int i = 0; i < m; i++) {
int feeArea = sc.nextInt();
if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
}
}
if (leftFeeAreaCnt <= rightFeeAreaCnt) {
System.out.println(leftFeeAreaCnt);
} else {
System.out.println(rightFeeAreaCnt);
}
}
} public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc.nextInt();
int m = sc.nextInt();
int x = sc.nextInt();
int leftFeeAreaCnt = 0;
int rightFeeAreaCnt = 0;
for (int i = 0; i < m; i++) {
int feeArea = sc.nextInt();
if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
}
}
if (leftFeeAreaCnt <= rightFeeAreaCnt) {
System.out.println(leftFeeAreaCnt);
} else {
System.out.println(rightFeeAreaCnt);
}
}
} Main
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc.nextInt();
int m = sc.nextInt();
int x = sc.nextInt();
int leftFeeAreaCnt = 0;
int rightFeeAreaCnt = 0;
for (int i = 0; i < m; i++) {
int feeArea = sc.nextInt();
if (feeArea < x) {
leftFeeAreaCnt++;
} else if (x < feeArea) {
rightFeeAreaCnt++;
}
}
if (leftFeeAreaCnt <= rightFeeAreaCnt) {
System.out.println(leftFeeAreaCnt);
} else {
System.out.println(rightFeeAreaCnt);
}
}
}