jiahuimbzuai/CoQuIR huggingface dataset:
//  [javascript]
function Main(input) {
    input = input.split("\n");
    n = input[0].split("");
    
    total = 0;

    
    for (let i = 0; i < n.length; i++) {
        num = parseInt(n[i], 10);
        total += num;        
    }



    if (total % 9 == 0) {

        console.log("Yes");
        
    } else if(total % 9 != 0){
        console.log("No");
    }



}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
var readline = require('readline');
var rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    terminal: false
});

rl.on('line', function (line) {
    let sum = 0;
    for(let i=0; i < line.length; i++) {
        sum += Number(line[i]);
    }
    if(sum % 9 === 0) {
        console.log("Yes");
    } else {
        console.log("No");
    }
})
//  [go]
package main

import (
	"fmt"
	"strconv"
)

func main() {
	var n string
	fmt.Scan(&n)

	ns := split(n)
	sum := 0
	for i := 0 ;i < len(ns); i++ {
		a, _ := strconv.Atoi(ns[i])
		sum +=  a
	}

	if sum % 9 == 0 {
		fmt.Println("Yes")
		return

	}
	fmt.Println("No")
}


func Sum(arr ...int) (sum int) {
	for _, x := range arr {
		sum += x
	}
	return
}
func split(s string) []string {
	ret := make([]string, len([]rune(s)))
	for i, v := range []rune(s) {
		ret[i] = string(v)
	}
	return ret
}
//  [go]
package main

import (
	"fmt"
	"log"
	"strconv"
)

// 09, 18, 27, 36, 45, ... 90, 99, 108
func main() {
	var num string
	if _, err := fmt.Scan(&num); err != nil {
		log.Fatal(err)
	}

	var sum int
	for _, ch := range num {
		n, err := strconv.Atoi(string(ch))
		if err != nil {
			log.Fatal(err)
		}

		sum += n
	}

	if sum%9 == 0 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var s string

	fmt.Scan(&s)

	n := 0

	for i := 0; i < len(s); i++ {
		n = (n + int(s[i] - '0')) % 9
	}

	if n == 0 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [ruby]
require 'set'; require 'prime'; require 'pp'
INF=Float::INFINITY; MOD=10**9+7
ns = gets.chomp

sum = 0
ns.each_char do |c|
  sum += c.to_i
end

puts sum%9==0 ? 'Yes' : 'No'
//  [ruby]
io = DATA.eof? ? STDIN : DATA
n=io.gets.to_i
if n.to_s.split(//).map(&:to_i).sum%9==0
  puts 'Yes'
else
  puts 'No'
end
__END__
//  [ruby]
#exec({'RUBY_THREAD_VM_STACK_SIZE'=>'100000000'},'/usr/bin/ruby', $0) if !ENV['RUBY_THREAD_VM_STACK_SIZE']
require 'prime'

def inpf() a=gets.chomp.split(" ").map(&:to_f)end

def inps() a=gets.chomp.split(" ")end

def copy(a) Marshal.load(Marshal.dump(a)) end

def kaijo(n,r = 10**9+7)(n < 2)? 1 : (2..n).inject{|memo,u|memo=(memo*u)%r} end

def na(n,d=0) Array.new(n,d)end

def na2(n,m,d=0) Array.new(n){Array.new(m,d)}end

def na3(n,m,l,d=0) Array.new(n){Array.new(m){Array.new(l,d)}}end

def inp() a=gets.chomp.split(" ").map(&:to_i)end

def r_up(a, b) (a+b-1)/b end

def sum(a) a.inject(:+) end

def big(a,b) return (a>b)? a:b end

def small(a,b) return (a<b)? a:b end

n = sum(gets.chomp.split("").map(&:to_i))
if(n%9 == 0)
  puts "Yes"
else
  puts "No"
end
//  [rust]
use proconio::{fastout, input, marker::Chars};
#[allow(unused_mut)]
#[fastout]
fn main() {
    input! {
        s: Chars
    }
    let s: Vec<char> = s;
    let sum: usize = s
        .iter()
        .fold(0, |sum, &i| sum + i.to_string().parse::<usize>().unwrap());
    println!("{}", if sum % 9 == 0 { "Yes" } else { "No" });
}
//  [rust]
use proconio::input;

fn main() {
    input! {
        n: String,
    }
    let result: i32 = n
        .chars()
        .into_iter()
        .map(|v| v.to_string().parse::<i32>().unwrap())
        .sum();
    if result % 9 == 0 {
        println!("Yes");
    } else {
        println!("No");
    }
}
//  [swift]
import Foundation

main()

func main() {
    let n = readLine()!
    let sum = n.reduce(0) { $0 + Int(String($1))! }
    let ans = sum % 9 == 0 ? "Yes" : "No"
    print(ans)
}
//  [swift]
import Foundation


func readStr() -> String {
  return readLine()!
}

func readInt() -> Int {
    return Int(readLine()!)!
}

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readTwoInts() -> (a: Int, b: Int) {
    let ints = readLine()!.split(separator: " ").map { Int($0)! }
    return (a: ints[0], b: ints[1])
}

print(readStr().map { Int(String($0))! }.reduce(0) { $0 + $1 } % 9 == 0 ? "Yes" : "No")
//  [swift]
import Foundation

func readInt() -> Int {
    return Int(readLine()!)!
}

func readString() -> String {
    return readLine()!
}

func readLines(times: Int) -> [String] {
    var array = [String]()
    for _ in 0..<times {
        array.append(readLine()!)
    }
    return array
}

func readSeparatedStrings() -> [String] {
    return readLine()!.split(separator: " ").map {String($0)}
}

func readStringToStrings() -> [String] {
    return readLine()!.map{String($0)}
}

func readSeparatedInts() -> [Int] {
    return readLine()!.split(separator: " ").map {Int($0)!}
}
func readSeparatedDouble() -> [Double] {
    return readLine()!.split(separator: " ").map {Double($0)!}
}

// 二進数に変換
func convertIntToRadix2(n: Int, radix: Int = 2) -> String {
    return String(n, radix: radix)
}

//配列を逆順にする reverced ソートする　sorted
//最初数文字取得 prefix


let N = readStringToStrings().map {Int($0)!}.reduce(0, +)

if N.isMultiple(of: 9) {
    print("Yes")
} else {
    print("No")
}
//  [typescript]
import { readFileSync } from 'fs'
import { reverse } from 'dns'
import { start } from 'repl'
 
let lines: string[] = [];
const reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
 
reader.on('line', function (line: string) {
    lines.push(line);
});
reader.on('close', function () {
    let S = lines[0]
    let tmp = 0

    for(let i = 0; i< S.length; i++) {
        tmp += parseInt(S[i], 10)
    }

    if(tmp % 9 == 0) {
        console.log('Yes')
    } else {
        console.log('No')
    }
});
//  [typescript]
import * as fs from 'fs';

function main(input) {
  input = input.split("\n");
  const tmp = input[0];
  const sum = tmp.split('').map(s => parseInt(s)).reduce((prev, current) => prev + current);
  console.log('%s', sum % 9 === 0 ? 'Yes' : 'No');
  return 0;
}

main(fs.readFileSync("/dev/stdin", "utf8"));
//  [typescript]
function main(input) {
    const numberArray = input.split('');
 	let result = 0;
  	numberArray.forEach(one => {
      result += Number(one)
    })
  	if(result % 9 ==0) console.log('Yes');
  	else console.log('No');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [python]
def main():
	import numpy as np
	n = int(input())
	if (n == 7 or n == 5 or n == 3):
		print("YES")
	else:
		print("NO")

main()
//  [python]
# -*- coding: utf-8 -*-
"""
Created on Sun Dec  2 20:06:38 2018

@author: Owner
"""

import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter

def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   

"""
N, X = map(int, input().split())

x = [0]*N
x[:] = map(int, input().split())

P = [0]*M
Y = [0]*M
for m in range(M):
    P[m], Y[m] = map(int, input().split())
"""

X = int(input())

if X == 7:
    print('YES')
    sys.exit()
elif X == 5:
    print('YES')
    sys.exit()
elif X == 3:
    print('YES')
    sys.exit()
else:
    print('NO')
//  [python]
X = input()
print "YES" if X in [7, 5, 3] else "NO"
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.*;

public class Main implements Runnable {

    public static void main(String[] args) throws Exception {
        Thread.setDefaultUncaughtExceptionHandler((t, e)->System.exit(1));
        new Thread(null, new Main(), "", 16 * 1024 * 1024).start();
    }

    public void run() {
        int age = 0;
        // 入力
        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            age = Integer.parseInt(br.readLine());
        } catch (Exception e) {
            e.printStackTrace();
        }

        // 出力
        String result = "NO";
        switch(age) {
            case 7:
            case 5:
            case 3:
                result = "YES";
                break;
        }
        System.out.println(result);
    }
}
//  [java]

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int X = Integer.parseInt(scan.next());
		if(X == 7 || X == 5 || X == 3) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}
	}
}
//  [java]
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        
        if (x == 7 || x == 5 || x == 3){
            System.out.println("YES");
        }else {
            System.out.println("NO");
        }

    }

}
//  [cpp]
#include<iostream>
#include<vector>
#include<algorithm>
#include<cctype>
#include<utility>
#include<string>
#include<cmath>
#include<cstdio>
#include<map>
#include<set>
#include<queue>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;
typedef long long int ll;

int main(){

    ll n;
    cin >> n;
    if(n == 3 || n == 5 || n == 7){
        cout << "YES" << endl;
    }else{
        cout << "NO" << endl;
    }



    return 0;
}
//  [cpp]
#include <iostream>
using namespace std;

int main() {
    int x;
    cin >> x;
    if (x == 7 || x == 5 || x == 3) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
    return 0;
}
//  [c]
#include <stdio.h>
//#include <string.h>

int main(void){
  
  int d;
  
  scanf("%d", &d);

  if(d==7|| d==5|| d==3) printf("YES");
  else printf("NO");
  
  return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>

#define rep(i, n) for(int i=0; i<(n); ++i)
#define max  200001

//qsort(str, n, sizeof(int), up_comp);
int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;}
int down_comp(const void *a, const void *b){return *(int*)b - *(int*)a;}
int int_sort( const void * a , const void * b ) {return strcmp(( char * )a , ( char * )b );}
int count_digit(int a){int i=0;while(a!=0){a=a/10;i++;}return i;}
int euclid( int a, int b ){int temp;if(a<b){temp=a;a=b;b=temp;}if(b<1)return -1;if(a%b==0) return b;return euclid(b,a%b);}

int main(void){
 
    int n;
    
    scanf("%d", &n);
    
    if (n==7||n==5||n==3) {
        printf("YES");
    } else {
        printf("NO");
    }
    
    return 0;
}
//  [c]
#include<stdio.h>
int main()
{
	int x;

	scanf("%d",&x);

	if(x==7||x==5||x==3)
		puts("YES");
	else
		puts("NO");
	return 0;
}
//  [javascript]
"use strict";
function Main (input) {
const age = parseInt(input);
const yes = age === 3 || age === 5 || age === 7;
console.log(yes ? "YES" : "NO");
}

//標準入力から文字列を受け取ってMain関数を実行
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
var toInt = x=>parseInt(x,10);
var toIntArr = arr=>arr.map(x=>toInt(x));
var abs = x=>x>0?x:-x;
function min(){var rest = arguments,val=rest[0];for(var i=1;i<rest.length;i++)if(rest[i]<val)val = rest[i];return val}
function max(){var rest = arguments,val=rest[0];for(var i=1;i<rest.length;i++)if(rest[i]>val)val = rest[i];return val}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
 
function Main(input){
	var input = input.split('\n');
	var n = toInt(input[0]);
	var ans = 'NO';
	if(n===3 || n === 5 || n === 7) ans = 'YES';

	console.log(ans);
}
//  [javascript]
function sumArray (array) {
	return array.reduce((a, c) => a + c);
}

// inputに入力データ全体が入る
function Main(input) {
	var N = input;
	if (N == 7) {
		console.log('YES');
		return;
	}
	if (N == 5) {
		console.log('YES');
		return;
	}
	if (N == 3) {
		console.log('YES');
		return;
	}
	console.log('NO');
}

// ※この行以降は編集しない (標準入力から一度に読み込みMainを呼び出します)
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	var x string
	fmt.Scan(&x)
	if strings.Contains("753", x) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
//  [go]
package main
 
import (
	"fmt"
)
 
func main() {
  var x int
  fmt.Scanf("%d", &x)

  ans := "NO"
  if x == 7 {
    ans = "YES"
  }
  if x == 5 {
    ans = "YES"
  }
  if x == 3 {
    ans = "YES"
  }
  fmt.Printf("%s\n", ans)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)

func scanString() string   { sc.Scan(); return sc.Text() }
func scanRunes() []rune    { return []rune(scanString()) }
func scanInt() int         { a, _ := strconv.Atoi(scanString()); return a }
func scanInt64() int64     { a, _ := strconv.ParseInt(scanString(), 10, 64); return a }
func scanFloat64() float64 { a, _ := strconv.ParseFloat(scanString(), 64); return a }

func scanInts(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = scanInt()
	} 
	return res
}

func debug(a ...interface{}) { fmt.Fprintln(os.Stderr, a...) }

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

//•*¨*•.¸¸♪main•*¨*•.¸¸♪(　-ω-)ノ　(　・ω・)
func main() {
	defer wr.Flush()
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 10000), 1001001)

	x := scanInt()
	if x == 3 || x==5 || x==7 {
		fmt.Fprintln(wr, "YES")
	} else {
		fmt.Fprintln(wr, "NO")
	}
}
//  [ruby]

n = gets.chomp.to_i

if [3,5,7].include?(n)
  puts("YES")
else
  puts("NO")
end
//  [ruby]
#!/usr/bin/env ruby

require 'set'

class Hash
  def push(key, value)
    self[key] = [] if self[key] == nil
    self[key].push(value)
  end
end

class Array
  def lower_bound(value)
    left = -1;
    right = self.length;
    while left + 1 < right
      mid = left + (right - left) / 2;
      if self[mid] >= value
        right = mid
      else
        left = mid
      end
    end
    right
  end

  def unique
    res = [self.first]
    each_cons(2) do |a, b|
      if a != b
        res.push(b)
      end
    end
    res
  end
end

def get_ints
  gets.chomp.split.map(&:to_i)
end

def get_ints_minus_one
  get_ints.map { |x| x - 1 }
end

def get_int
  gets.chomp.to_i
end

X = get_int

case X
when 3, 5, 7
  puts 'YES'
else
  puts 'NO'
end
//  [ruby]
X = gets.to_i
if X==3 or X==5 or X==7 then
 puts "YES"
else
 puts "NO"
end
//  [rust]
// Try AtCoder
//author: Leonardone @ NEETSDKASU

fn main() {
	let mut stdin = String::new();
    std::io::Read::read_to_string(
    	&mut std::io::stdin(),
        &mut stdin).unwrap();
    let mut stdin = stdin.split_whitespace();
    let mut get = || stdin.next().unwrap();
    macro_rules! get {
    	($t:ty) => (get().parse::<$t>().unwrap());
        () => (get!(i64));
    }
    
    let x = get!();
    
    if x == 3 || x == 5 || x == 7 {
    	println!("YES");
    } else {
    	println!("NO");
    }
}
//  [swift]
let X = Int(readLine()!)!
print([3,5,7].contains(X) ? "YES" : "NO")
//  [python]
s=input().split()
if(s[1]=='+'):
    print(int(s[0])+int(s[2]))
else:
    print(int(s[0])-int(s[2]))
//  [python]
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

s = inputSL()

if s[1]=="+":
  print(int(s[0])+int(s[2]))
else:
  print(int(s[0])-int(s[2]))
//  [python]
s = input().split()
a,b = int(s[0]),int(s[2])
if s[1] == "+":
  print(a+b)
else:
  print(a-b)
//  [java]
import java.util.Scanner;

import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

public class Main {

	public static void main(String[] args) throws ScriptException {
		try (Scanner scanner = new Scanner(System.in)) {
			String s = scanner.nextLine();
			System.out.println((new ScriptEngineManager()).getEngineByName("JavaScript").eval(s));
		}
	}
}
//  [java]
import java.util.Scanner;

public class Main{
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		String op = sc.next();
		long b = sc.nextLong();
		
		switch(op){
			case "+":
				System.out.println((long)(a + b));
				break;
			case "-":
				System.out.println((long)(a - b));
		}
		sc.close();
	}
}
//  [java]
import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		char op = sc.next().charAt(0);
		int b = sc.nextInt();
		if( op == '+' ){System.out.println(a+b);}
		else if( op == '-' ){System.out.println(a-b);}
                return;
	}
}
//  [cpp]
#include<iostream>

int main(){
    int a,b,c;
    std::string s;

    std::cin >> a >> s >> b;
    if(s == "+"){
        c = a + b;
    }else if(s == "-"){
        c = a - b;
    }else{
        return -1;
    }

    std::cout << c << std::endl;
    return 0;
}
//  [cpp]
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main(void){
  long long int a,b;
  char c;
  scanf("%lld %c %lld",&a,&c,&b);
  if(c=='+') printf("%lld\n",a+b);
  else printf("%lld\n",a-b);
  return 0;
}
//  [cpp]
#include <iostream>
#include <string>

using namespace std;


int main()
{
	int A, B;
	string op;

	cin >> A >> op >> B;

	if (op == "+") {
		cout << A + B << endl;
	}
	else if (op == "-") {
		cout << A - B << endl;
	}
	

	return 0;
}
//  [c]
#include<stdio.h>
int main (){
  int A,B;
  char op;
  
  scanf("%d %c %d",&A,&op,&B);
  
  if(op=='+')printf("%d\n",A+B);
  
    else printf("%d\n",A-B);
  
return 0;
}
//  [c]
#include<stdio.h>

int main()

{
    int A,B;
    char op;

    scanf("%d %c %d",&A,&op,&B);

    if(op =='+')
        {
      //  printf("%d op %d",A,B);
        printf("%d",A+B);
        }
    else 
      //  printf("%d op %d",A,B);
        printf("%d",A-B);


}
//  [c]
#include<stdio.h>
int main()
{
    int a,b;
    char c;
    scanf("%d %c %d",&a,&c,&b);
    if(c=='+'){
        printf("%d",a+b);
    }else printf("%d",a-b);

    return 0;

}
//  [javascript]
function Main(input) {
  // 入力
  input = input.split(" ");
	//input = input.split("\n");
	//tmp = input[1].split(" ");
	var a = parseInt(input[0], 10);
	var op = input[1];
  var b = parseInt(input[2], 10);
  var ans;
  // 計算
  if (op === '+') {
    ans = a + b;
  } else {
    ans = a - b;
  }
  
	//出力
	console.log('%d', ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
    input = input.split(" ");
    if(input[1] == "+"){
      var s = parseInt(input[0])+parseInt(input[2]);
    } else if(input[1] == "-"){
      var s = parseInt(input[0])-parseInt(input[2]);
    } else {
       var s = 0;
    }
    console.log('%s', s);
}

function debug(){
	var input = document.getElementById("input").value;
	Main(input);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
"use strict";
// inputに入力データ全体が入る
const main = (input) => {
  const [A, B, C] = input.trim().split(" ");
  if (B == "+") {
    console.log(Number(A) + Number(C));
  } else {
    console.log(Number(A) - Number(C));
  }
};

// ※この行以降は編集しない (標準入力から一度に読み込みMainを呼び出します)
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import "fmt"

func main() {
	var a, b int
	var op string
	fmt.Scan(&a, &op, &b)

	if op == "+" {
		fmt.Println(a + b)
	} else {
		fmt.Println(a - b)
	}
}
//  [go]
package main

import "fmt"

func main() {
	var a, b int
	var op string
	fmt.Scan(&a, &op, &b)
	if op == "+" {
		fmt.Println(a + b)
	} else {
		fmt.Println(a - b)
	}
}
//  [go]
package main

import "fmt"

func main() {
	// Code for A - Addition and Subtraction Easy
	var A, B int
	var op string
	fmt.Scanf("%d %s %d", &A, &op, &B)

	if op[0] == '+' {
		fmt.Println(A + B)
	} else {
		fmt.Println(A - B)
	}
}
//  [ruby]
a, op, b = gets().chomp.split("\s")

puts op == '+' ? a.to_i + b.to_i : a.to_i - b.to_i
//  [ruby]
p eval(gets.chomp)
//  [ruby]
a, op, b = gets.split
if op == "+"
  puts a.to_i + b.to_i
else
  puts a.to_i - b.to_i
end
//  [rust]
#![allow(non_snake_case)]
#![allow(unused_imports)]

use proconio::{input, fastout};
use proconio::marker::*;
use whiteread::parse_line;
use std::collections::*;
use num::*;
use num_traits::*;
use superslice::*;
use std::ops::*;

use itertools::Itertools;
use itertools_num::ItertoolsNum;

#[fastout]
fn main() {
    input!{
        a: isize,
        op: char,
        b: isize,
    }


    if op == '+' { 
        println!("{}", a + b);
    } else {
        println!("{}", a - b)
    }
}
//  [rust]
use proconio::input;

// use std::cmp::*;
// use std::collections::*;
// use proconio::marker::Chars;

fn main() {
    input! {
        // s: String
        // n: isize
        a:i64,
        c:char,
        b:i64,
    }
    let ans = if c=='+'{
        a+b
    }else{
        a-b
    };
    println!("{}",ans);
}
//  [rust]
use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();

    let answer = solve(&buf);

    println!("{}", answer);
}

fn solve(input: &str) -> String {
    let mut iterator = input.split_whitespace();

    let a: isize = iterator.next().unwrap().parse().unwrap();
    let op = iterator.next().unwrap();
    let b: isize = iterator.next().unwrap().parse().unwrap();

    if op == "+" {
        (a + b).to_string()
    } else {
        (a - b).to_string()
    }
}
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const A = Number(input[0][0]);
  const B = Number(input[0][2]);
  const op = input[0][1];

  return op === "+" ? A + B : A - B;
};

console.log(main(read()));
//  [typescript]
import * as fs from 'fs';

const args = fs.readFileSync('/dev/stdin', 'utf8').trim().split(' ');
const a: number = parseInt(args[0]);
const op: string = args[1];
const b: number = parseInt(args[2]);

if (op === '+') {
    console.log(a + b);
}
if (op === '-') {
    console.log(a - b);
}
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  let[a,b,c]=srin(3)
  out(eval(a+b+c))
}
main()
//  [python]
from subprocess import run

with open("./tmp215378912379.cpp", mode='w') as f:
  f.write("""
#include <bits/stdc++.h>
template <class T>
concept Integral = std::is_integral_v<T>;

int main() {
  auto f = []<Integral T>(T a, T b) { return a * b; };
  int a, b;
  std::cin >> a >> b;
  std::cout << f(a, b) << std::endl;
}
""")

run("g++ -o ./tmp215378912379 -std=gnu++2a -fconcepts ./tmp215378912379.cpp && ./tmp215378912379", shell=True)
//  [python]
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce, lru_cache  # @lru_cache(None)
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return (int(x) for x in input().split())
def LI(): return list(Is())
def TI(): return tuple(Is())
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(S())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18
# ----------------------------------------------------------- #

a, b = Is()
print(a*b)
//  [java]
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int a = Integer.parseInt(sc.next());
        int b= Integer.parseInt(sc.next());
        System.out.println(a*b);
        
    }
}
//  [java]
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int A =sc.nextInt();
        final int B =sc.nextInt();

        System.out.println(A*B);
    }
}
//  [java]
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int B = sc.nextInt();
		System.out.println(N*B);
	}
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
using lint = long long;

vector<lint> test(1024 * 1024 * 100);

int main() {

    int a, b;
    cin >> a >> b;
    cout << a * b << endl;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
using lint = long long;

vector<bool> test(1024 * 1024 * 1200);

int main() {

    int a, b;
    cin >> a >> b;
    cout << a * b << endl;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
using lint = long long;

vector<bool> test(1024 * 1024 * 1100);

int main() {

    int a, b;
    cin >> a >> b;
    cout << a * b << endl;
}
//  [c]
#include <stdio.h>
int main(){
int a,b;
scanf("%d%d",&a,&b);
printf("%d\n",a*b);
}
//  [c]
#include <stdio.h>

int main(void)
{
    int a, b;
    scanf("%d", &a);
    scanf("%d", &b);

    printf("%d\n", a*b);

    return 0;
}
//  [c]
#include <stdio.h>

int main(){
  int A,B;
  scanf("%d %d",&A,&B);
  printf("%d\n",A*B);
  return 0;
}
//  [javascript]
"use strict";

const main = arg => {
    const inputList = arg.trim().split("\n");
    // 回答を記述
    const A = inputList[0].split(" ")[0];
    const B = inputList[0].split(" ")[1];

    console.log(parseInt(A) * parseInt(B));

}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(input) {
  input = input.split("\n");
  var ans = parseInt(input[0].split(" ")[0])*parseInt(input[0].split(" ")[1]);

  console.log('%s', ans);
  return ans;
}

function debug(n){
  var input = document.getElementById("input"+n).value;
  var ans=Main(input);
  var result="WA";
  if(ans==document.getElementById("output"+n).value.split("\n")[0]){
    result="AC";
  }
  document.getElementById("result"+n).innerHTML=result;
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input){
    input=input.split("\n");  //ここまで必須
    var line=input[0].split(" ");
    console.log(parseInt(line[0])*parseInt(line[1]))
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var stdInScanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	stdInScanner.Scan()
	i, _ := strconv.Atoi(stdInScanner.Text())
	return i
}

func main() {
	stdInScanner.Split(bufio.ScanWords)

	A := nextInt()
	B := nextInt()

	fmt.Println(A * B)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	var n, k int

	firstArg := nextLine()
	nSlice := strings.Split(firstArg, " ")

	n, _ = strconv.Atoi(nSlice[0])
	k, _ = strconv.Atoi(nSlice[1])

	fmt.Print(n * k)
}
//  [ruby]
#exec({'RUBY_THREAD_VM_STACK_SIZE'=>'100000000'},'/usr/bin/ruby', $0) if !ENV['RUBY_THREAD_VM_STACK_SIZE']
require 'prime'

def inpf() a=gets.chomp.split(" ").map(&:to_f)end

def inps() a=gets.chomp.split(" ")end

def copy(a) Marshal.load(Marshal.dump(a)) end

def kaijo(n,r = 10**9+7)(n < 2)? 1 : (2..n).inject{|memo,u|memo=(memo*u)%r} end

def na(n,d=0) Array.new(n,d)end

def na2(n,m,d=0) Array.new(n){Array.new(m,d)}end

def na3(n,m,l,d=0) Array.new(n){Array.new(m){Array.new(l,d)}}end

def inp() a=gets.chomp.split(" ").map(&:to_i)end

def r_up(a, b) (a+b-1)/b end

def sum(a) a.inject(:+) end

def big(a,b) return (a>b)? a:b end

def small(a,b) return (a<b)? a:b end

a,b = inp
p a*b
//  [ruby]
require 'set'; require 'prime'; require 'pp'
INF=Float::INFINITY; MOD=10**9+7
a,b = gets.chomp.split.map(&:to_i)
puts a * b
//  [ruby]
getter = -> {
    require 'stringio'
    _in = StringIO.new
    while l = gets
        _in << l
    end
    _in.string
}
_in = getter.call

a,b = _in.strip.split(' ').map(&:to_i)
puts "#{a*b}"
//  [swift]
import Foundation

let str = readLine()!
let words = str.components(separatedBy: " ")
let a = Int(words[0])!
let b = Int(words[1])!

print("\(a * b)")
//  [swift]
import Foundation
var inl=readLine()!.components(separatedBy:" ")
print(Int(inl[0])!*Int(inl[1])!)
//  [swift]
import Foundation

//print("Hello, World!")

let input = readLine()!
//print(input)

let nums = input.components(separatedBy: " ")
//print(nums)

let a = Int(nums[0])!
let b = Int(nums[1])!
print("\(a * b)")
//  [typescript]
import { readFileSync } from 'fs'
import { reverse } from 'dns'
import { start } from 'repl'
 
let lines: string[] = [];
const reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
 
reader.on('line', function (line: string) {
    lines.push(line);
});
reader.on('close', function () {
    let [x, y] = lines[0].split(' ').map( _ => parseInt(_))

    console.log(x * y)

});
//  [typescript]
"use strict";

const main = arg => {
  const input = arg.trim().split("\n");

  const A = parseInt(input[0].split(" ")[0]);
  const B = parseInt(input[0].split(" ")[1]);
  console.log(A * B);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [python]
N = int(input())
d = list(map(int,input().split()))
d = sorted(d)
chuou1 = d[N//2-1]
chuou2 = d[(N//2)]
if(chuou2 - chuou1 < 0):
  print("0")
else:
  print(str(chuou2 - chuou1))
//  [python]
n=int(input())
dif=list(map(int,input().split()))
dif.sort()
print(dif[int(n/2)]-dif[int(n/2-1)])
//  [python]
n=int(input())
d=list(map(int,input().split()))
d.sort()
print(d[n//2]-d[n//2-1])
//  [python]
#!/usr/bin/env python3
import sys

def delete(larger, move):
    for i in move:
        larger.remove(i)
    return larger

def solve(N: int, d: "List[int]"):
    ABC = []
    ARC = sorted(d)

    count = 0

    for K in range(10**6):
        move = []
        for i in ARC:
            if i < K:
                move.append(i)
            else:
                break
        ABC += move
        delete(ARC, move)

        if len(ABC) == len(ARC):
            count += 1
        elif len(ABC) > len(ARC):
            break
        
    print(count)

    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    d = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, d)

if __name__ == '__main__':
    main()
//  [python]
import sys
import numpy as np
import numba
from numba import jit

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

@jit
def main(n, d):
  d_sort = np.sort(d)
  num = len(d_sort)//2
  return d_sort[num]-d_sort[num-1]


n = int(readline())
d = np.array(readline().split(), np.int64)


print(main(n, d))
//  [java]
import java.io.*;
import java.util.*;
class Main{
	static final long MOD = 1_000_000_007; // 10^9+7
    static final int MAX = 2_147_483_646; // intMax 
    static final int INF = 1_000_000_000; // 10^9  
    public static void main(String[] args) throws Exception {
		hayami saori = new hayami();
		int n = saori.saori_hayami();
		int[] d = new int[n];
		for(int i = 0;i < n;i++){
			d[i] = saori.saori_hayami();
		}
		Arrays.sort(d);
		int num = n/2 -1;
		if(d[num] == d[num+1]){
			System.out.println(0);
		} else {
			System.out.println(d[num+1] - d[num]);
		}
		
		saori.close();
    }
}

class hayami implements Closeable {
	private final InputStream in = System.in;
	private final byte[] hayami = new byte[1024];
	private int Hayami = 0;
	private int saori = 0;
	private boolean HayamiSaori() {
		if (Hayami < saori) {
			return true;
		}else{
			Hayami = 0;
			try {
				saori = in.read(hayami);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (saori <= 0) {
				return false;
			}
		}
		return true;
	}
	private int SaoriHayami() { 
		if (HayamiSaori()) {
            return hayami[Hayami++];
         }else{
             return -1;
         }
	}
	private static boolean hayami_saori(int hayami) { 
		return 33 <= hayami && hayami <= 126;
	}
	public boolean hayamisaori() { 
		while(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();
	}
	public String nextHayami() {
		if (!hayamisaori()) throw new NoSuchElementException();
		StringBuilder hayamin = new StringBuilder();
		int saori = SaoriHayami();
		while(hayami_saori(saori)) {
			hayamin.appendCodePoint(saori);
			saori = SaoriHayami();
		}
		return hayamin.toString();
	}
	public long saorihayami() {//nextLong
		if (!hayamisaori()) throw new NoSuchElementException();
		long hayami = 0;
		boolean misao = false;
		int saori = SaoriHayami();
		if (saori == '-') {
			misao = true;
			saori = SaoriHayami();
		}
		if (saori < '0' || '9' < saori) {
			throw new NumberFormatException();
		}
		while(true){
			if ('0' <= saori && saori <= '9') {
				hayami *= 10;
				hayami += saori - '0';
			}else if(saori == -1 || !hayami_saori(saori)){
				return misao ? -hayami : hayami;
			}else{
				throw new NumberFormatException();
			}
			saori = SaoriHayami();
		}
	}
	public int saori_hayami() {//nextInt
		long hayami = saorihayami();
		if (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();
		return (int) hayami;
	}
	public double Hayamin() { //nextDouble
		return Double.parseDouble(nextHayami());
	}
	public void close() {
		try {
			in.close();
		} catch (IOException e) {
		}
    }
    
}
//  [java]
import java.util.Comparator;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {
	public static void main(String[] args) {

		Scanner sysin = new Scanner(System.in);
		final int n = sysin.nextInt();
		int[] d = IntStream.range(0, n)
					.map(i -> sysin.nextInt())
					.boxed()
					.sorted(Comparator.naturalOrder())
					.mapToInt(Integer::intValue)
					.toArray();
		sysin.close();

		int low = d[d.length / 2 - 1];
		int high = d[d.length / 2];

		System.out.println(high - low);
	}
}
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int[] d = new int[N];
        HashMap<Integer, Pair> map = new HashMap<>();
        List<Pair> pairlist = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            d[i] = scan.nextInt();
            if (!map.containsKey(d[i])) {
                Pair p = new Pair();
                p.d = d[i];
                p.count = 0;
                map.put(d[i], p);
                pairlist.add(p);
            }
            Pair p = map.get(d[i]);
            p.count += 1;
        }
        pairlist.sort(new PairComparator());
        int half = N / 2;
        int sum = 0;
        int length = pairlist.size();
        int point = 0;
        for (int i = 0;i < length; i++) {
            Pair p = pairlist.get(i);
            if (sum + p.count < half) {
                sum += p.count;
                continue;
            } else {
                sum += p.count;
                point = i;
                break;
            }
        }
        Pair target = pairlist.get(point);
        int current = sum;
        if (current == half) {
            Pair n = pairlist.get(point + 1);
            System.out.println(n.d - target.d);
        } else if (half < current) {
            System.out.println(0);
        }
    }
    class Pair {
        int d;
        int count;
    }
    class PairComparator implements Comparator<Pair> {
        @Override
        public int compare(Pair o1, Pair o2) {
            if (o1.d == o2.d) {
                return Integer.compare(o1.count, o2.count);
            }
            return Integer.compare(o1.d, o2.d);
        }
    }
}
//  [java]
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            list.add(scanner.nextInt());
        }

        list.sort(Integer::compareTo);

        int hoge = list.size() / 2;
        int left = list.get(hoge - 1);
        int right = list.get(hoge);
        System.out.println(right - left);
    }
}
//  [cpp]
#include <cstdio>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please

const int cm = 1 << 18;
char cn[cm], * ci = cn + cm, ct;
inline char getcha() {
	if (ci - cn == cm) { fread_unlocked(cn, 1, cm, stdin); ci = cn; }
	return *ci++;
}
inline int getint() {
	int A = 0;
	if (ci - cn + 16 > cm) while ((ct = getcha()) >= '0') A = A * 10 + ct - '0';
	else while ((ct = *ci++) >= '0') A = A * 10 + ct - '0';
	return A;
}

int main() {


	int N = getint();
	int D[100001] = {};
	rep(i, N) (*(D + getint()))++;
	int S = 0;
	int kotae = 0;
	for (int i = 100000; i > 0; i--) {
		S += *(D + i);
		if (S >= N / 2) {
			if (S == N / 2) {
				i--;
				kotae++;
				while (!D[i]) {
					kotae++;
					i--;
				}
			}
			break;
		}
	}
	printf("%d", kotae);

	Would you please return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please

const int cm = 1 << 17;
char cn[cm], * ci = cn + cm, ct;
inline char getcha() {
	if (ci - cn == cm) { fread_unlocked(cn, 1, cm, stdin); ci = cn; }
	return *ci++;
}
inline int getint() {
	int A = 0;
	if (ci - cn + 16 > cm) while ((ct = getcha()) >= '0') A = A * 10 + ct - '0';
	else while ((ct = *ci++) >= '0') A = A * 10 + ct - '0';
	return A;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	int N = getint();
	int D[100001] = {};
	rep(i, N) (*(D + getint()))++;
	int S = 0;
	int kotae = 0;
	for (int i = 100000; i > 0; i--) {
		S += *(D + i);
		if (S == N / 2) kotae++;
	}
	co(kotae);

	Would you please return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please

const int cm = 1 << 17;
char cn[cm], * ci = cn + cm, ct;
inline char getcha() {
	if (ci - cn == cm) { fread_unlocked(cn, 1, cm, stdin); ci = cn; }
	return *ci++;
}
inline int getint() {
	int A = 0;
	if (ci - cn + 16 > cm) while ((ct = getcha()) >= '0') A = A * 10 + ct - '0';
	else while ((ct = *ci++) >= '0') A = A * 10 + ct - '0';
	return A;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	int N = getint();
	int D[100001] = {};
	rep(i, N) (*(D + getint()))++;
	int S = 0;
	int kotae = 0;
	for (int i = 100000; i > 0; i--) {
		S += *(D + i);
		if (S >= N / 2) {
			if (S == N / 2) {
				i--;
				kotae++;
				while (!D[i]) {
					kotae++;
					i--;
				}
			}
			break;
		}
	}
	co(kotae);

	Would you please return 0;
}
//  [cpp]
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(int argc, const char * argv[]) {
    int n;
    cin >> n;
    
    vector<int> p;
    for (int i = 0; i < n; i++) {
        int t;
        cin >> t;
        p.push_back(t);
    }
    
    sort(p.begin(), p.end());
    
    int a = 0;
    for (int i = 0; i < n/2 + 1; i++) {
        int K = p[i];
        int ABC = 0;
        for (int i = 0; i < n/2 + 1; i++) {
            if (p[i] < K) {
                ABC++;
            }
        }
        
        if (ABC == n/2) {
            a = i;
            break;
        }
    }
    
    if (a == 0) {
        cout << a << endl;
        return 0;
    }
    
    cout << p[a] - p[a-1] << endl;
    
    return 0;
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;

#define MAX_N 100000

int N;
int d[MAX_N];

void quick_sort(int *v,int left,int right);
void swap(int *v,int i,int j);

int main(){
  cin>>N;
  for(int i=0;i<N;i++){
    cin>>d[i];
  }

  quick_sort(d,0,N-1);
  int k=d[N/2]-d[N/2-1];
  if(k<0){
    k*=(-1);
  }
  printf("%d\n",k);
  return 0;
}


void quick_sort(int *v,int left,int right)
{
  int i,last;
  if(left>=right)
    return;
  swap(v,left,(left+right)/2);
  last=left;
  for(i=left+1;i<=right;i++){
    if(v[i]<v[left]){//v[i]<v[left]------------------------------
      swap(v,++last,i);
    }
  }
  swap(v,left,last);
  quick_sort(v,left,last-1);
  quick_sort(v,last+1,right);
}

void swap(int *v,int i,int j)
{
  int temp;
  temp=v[i];
  v[i]=v[j];
  v[j]=temp;
}
//  [c]
// AtCoder ABC132: C - Divide the Problems
// 2019.9.3 bal4u

#include <stdio.h>
#include <stdlib.h>

#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif

int in() {   // 非負整数の入力
	int n = 0, c = gc();
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}

#define MAX 100000
int d[MAX+3];

int cmp(const void *u, const void *v) { return *(int *)u - *(int *)v; }

int main()
{
	int i, k, N, ans;

	N = in(); for (i = 0; i < N; i++) d[in()]++;
	N >>= 1;
	k = 0; for (i = 0; k < N; i++) k += d[i];
	if (k > N) ans = 0;
	else {
		k = i-1; while (d[i] == 0) i++;
		ans = i-k;
	}
	printf("%d\n", ans);
	return 0;
}
//  [c]
#include<stdio.h>
int main(void)
{
	int n,d[100001],a[100001]={0},x=0,i,j;
	scanf("%d", &n);
	for(i=0; i<n; i++)
	{
		scanf("%d", &d[i]);
		a[d[i]]++;
	}
	for(i=1; i<100001; i++)
	{
		if(a[i]>0)
		x+=a[i];
		if(x>=n/2)
		{
			if(x>n/2)
			printf("0\n");
			else
			{
				x=0;
				for(j=i+1; j<100001; j++)
				{
					x++;
					if(a[j]>0)
					break;
				}
				printf("%d\n", x);
			}
			break;
		}
	}
	
	return 0;
}
//  [c]
#include <stdio.h>

int n;
int d;
int s[100005];
int ans = 0;

int main()
{
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &d);

        s[d]++;
    }

    for (int i = 1; i <= 100000; i++) {
        s[i] += s[i - 1];
    }

    for (int i = 1; i <= 100000; i++) {
        if (s[i] == s[100000] - s[i]) {
            ans++;
        }
    }

    printf("%d\n", ans);

    return 0;
}
//  [c]
#include <stdio.h>


void sort1(int data[], int n){
    int i, j, x, y;
    for(i = 1; i < n; i++){
        x = data[i];
        for(j = i - 1; j >= 0; j--){
            y = data[j];
            if(y > x)
                data[j+1] = y;
            else {
                data[j+1] = x;
                break;
            }
        }
        if(j == -1) data[0] = x;
    }
}


int main(void) {
    int n, count = 0;
    scanf("%d", &n);
    int d[n];
    for(int i = 0; i < n; i++) {
        scanf("%d", &d[i]);
    }
    sort1(d, n);
    for(int i = d[n/2-1]+1; i <= d[n/2]; i++) {
        count++;
    }
    printf("%d\n",count);
    return 0;
}
//  [c]
    #include<stdio.h>
     
     
    void insertionSort(int a[],int n){
        int i,j,v;
        for(i=1;i<n;i++){
            v=a[i];          //v:未ソート部分の先頭
            j=i-1;
            while(j>=0&&a[j]>v){
                a[j+1]=a[j];    //vより大きい要素を後方へ移動
                j--;
            }
            a[j+1]=v;
        }
    }
     
    int main(void){
        int n,i,ans;
        scanf("%d",&n);
        int d[n];
        for(i=0;i<n;i++){
            scanf("%d",&d[i]);
        }
        insertionSort(d,n);
        ans=d[n/2]-d[n/2-1];
        printf("%d\n",ans);
        //printf("%d %d",d[n/2+1]);
        return 0;
    }