package main

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

func main() {
	r := bufio.NewReaderSize(os.Stdin, 1024*1024)
	lens := readInts(r, 2)
	t := readString(r, lens[0])
	s := readString(r, lens[1])

	if check(t, s) {
		fmt.Print("YES")
	} else {
		fmt.Print("NO")
	}
}

func check(t, s string) bool {
	if len(s) < len(t)-1 {
		return false
	}

	i := 0
	for ; i < len(t); i++ {
		if t[i] == '*' {
			break
		}

		if i >= len(s) || t[i] != s[i] {
			return false
		}
	}

	if i == len(t) {
		return i == len(s)
	}

	for j := 1; len(t) - j > i; j++ {
		if t[len(t) - j] != s[len(s) - j] {
			return false
		}
	}

	return true
}

func readString(reader *bufio.Reader, l int) string {
	sTemp := readLine(reader)
	if len(sTemp) < l {
		l = len(sTemp)
	}
	return sTemp[:l]
}

func readInts(reader *bufio.Reader, n int) []int {
	tmpInts := strings.Split(readLine(reader), " ")

	var result []int
	for i := 0; i < n; i++ {
		tmpInt, err := strconv.ParseInt(tmpInts[i], 10, 64)
		checkError(err)
		result = append(result, int(tmpInt))
	}
	return result
}

func readLine(reader *bufio.Reader) string {
	str, _, err := reader.ReadLine()
	if err == io.EOF {
		return ""
	}

	return strings.TrimRight(string(str), "\r\n")
}

func checkError(err error) {
	if err != nil {
		panic(err)
	}
}

package main

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

func main()  {

	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	var n, m int
	fmt.Fscanf(in, "%d %d %d %d %d\n", &n, &m)

	var s, t string
	fmt.Fscanf(in, "%s\n%s\n", &s, &t)

	starIndex := strings.Index(s, "*")

	if starIndex == -1 {

		if len(s) != len(t) {
			fmt.Fprintln(out, "NO")
			return
		}

		for i := 0; i < len(s); i++ {
			if s[i] != t[i] {
				fmt.Fprintln(out, "NO")
				return
			}
		}

		fmt.Fprintln(out, "YES")
		return

	}

	if len(t) < len(s) - 1 {
		fmt.Fprintln(out, "NO")
		return
	}

	for i := 0; i < starIndex; i++ {
		if s[i] != t[i] {
			fmt.Fprintln(out, "NO")
			return
		}
	}

	for i := starIndex + 1; i < len(s); i++ {
		if s[i] != t[len(t) + i - len(s)] {
			fmt.Fprintln(out, "NO")
			return
		}
	}

	fmt.Fprintln(out, "YES")

}

package main

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

func main() {
	r := bufio.NewReaderSize(os.Stdin, 1024*1024)
	lens := readInts(r, 2)
	t := readString(r, lens[0])
	s := readString(r, lens[1])

	if check(t, s) {
		fmt.Print("YES")
	} else {
		fmt.Print("NO")
	}
}

func check(t, s string) bool {
	bits := strings.Split(t, "*")
	if len(bits) > 2 {
		return false
	}
	if len(bits) == 1 {
		return t == s
	}
	if len(s) < len(bits[0]) + len(bits[1]) {
		return false
	}

	return bits[0] == s[:len(bits[0])] && bits[1] == s[len(s)-len(bits[1]):]
}

func readString(reader *bufio.Reader, l int) string {
	sTemp := readLine(reader)
	if len(sTemp) < l {
		l = len(sTemp)
	}
	return sTemp[:l]
}

func readInts(reader *bufio.Reader, n int) []int {
	tmpInts := strings.Split(readLine(reader), " ")

	var result []int
	for i := 0; i < n; i++ {
		tmpInt, err := strconv.ParseInt(tmpInts[i], 10, 64)
		checkError(err)
		result = append(result, int(tmpInt))
	}
	return result
}

func readLine(reader *bufio.Reader) string {
	str, _, err := reader.ReadLine()
	if err == io.EOF {
		return ""
	}

	return strings.TrimRight(string(str), "\r\n")
}

func checkError(err error) {
	if err != nil {
		panic(err)
	}
}

package main

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

func main() {
	r := bufio.NewReader(os.Stdin)

	ns, _ := r.ReadString(' ')
	n, _ := strconv.Atoi(ns[:len(ns)-1])

	ms, _ := r.ReadString('\n')
	m, _ := strconv.Atoi(ms[:len(ms)-1])

	ts, _ := r.ReadString('\n')
	t := ts[:n]

	ss, _ := r.ReadString('\n')
	s := ss[:m]

	if check(t, s) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}

}

func check(t string, s string) bool {
	if t == s {
		return true
	}

	if len(s) < len(t)-1 {
		return false
	}

	i := 0
	for ; i < len(t); i++ {
		if t[i] == '*' {
			break
		}

		if t[i] != s[i] {
			return false
		}
	}

	for j := 1; len(t) - j > i; j++ {
		if t[len(t) - j] != s[len(s) - j] {
			return false
		}
	}

	return true
}

package main

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

func main() {
	r := bufio.NewReader(os.Stdin)

	ns, _ := r.ReadString(' ')
	n, _ := strconv.Atoi(ns[:len(ns)-1])

	ms, _, _ := r.ReadLine()
	m, _ := strconv.Atoi(string(ms))

	ts, _, _ := r.ReadLine()
	t := string(ts[:n])

	ss, _, _ := r.ReadLine()
	s := string(ss[:m])

	fmt.Println(t, s)

	if check(t, s) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}

}

func check(t string, s string) bool {
	if t == s {
		return true
	}

	if len(s) < len(t)-1 {
		return false
	}

	i := 0
	for ; i < len(t); i++ {
		if t[i] == '*' {
			break
		}

		if t[i] != s[i] {
			return false
		}
	}

	for j := 1; len(t) - j > i; j++ {
		if t[len(t) - j] != s[len(s) - j] {
			return false
		}
	}

	return true
}

package main

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

func main() {
	r := bufio.NewReader(os.Stdin)
	lens := readInts(r, 2)
	t := readString(r, lens[0])
	s := readString(r, lens[1])

	if check(t, s) {
		fmt.Print("YES")
	} else {
		fmt.Print("NO")
	}
}

func check(t, s string) bool {
	bits := strings.Split(t, "*")
	if len(bits) > 2 {
		return false
	}
	if len(bits) == 1 {
		return t == s
	}
	if len(s) < len(bits[0]) + len(bits[1]) {
		return false
	}

	return bits[0] == s[:len(bits[0])] && bits[1] == s[len(s)-len(bits[1]):]
}

func readString(reader *bufio.Reader, l int) string {
	sTemp := readLine(reader)
	if len(sTemp) < l {
		l = len(sTemp)
	}
	return sTemp[:l]
}

func readInts(reader *bufio.Reader, n int) []int {
	tmpInts := strings.Split(readLine(reader), " ")

	var result []int
	for i := 0; i < n; i++ {
		tmpInt, err := strconv.ParseInt(tmpInts[i], 10, 64)
		checkError(err)
		result = append(result, int(tmpInt))
	}
	return result
}

func readLine(reader *bufio.Reader) string {
	str, _, err := reader.ReadLine()
	if err == io.EOF {
		return ""
	}

	return strings.TrimRight(string(str), "\r\n")
}

func checkError(err error) {
	if err != nil {
		panic(err)
	}
}

package main

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

func main() {
	r := bufio.NewReader(os.Stdin)

	ns, _ := r.ReadString(' ')
	n, _ := strconv.Atoi(ns[:len(ns)-1])

	ms, _, _ := r.ReadLine()
	m, _ := strconv.Atoi(string(ms))

	ts, _, _ := r.ReadLine()
	t := string(ts[:n])

	ss, _, _ := r.ReadLine()
	s := string(ss[:m])

	fmt.Println(t, s)

	if check(t, s) {
		fmt.Print("YES")
	} else {
		fmt.Print("NO")
	}

}

func check(t string, s string) bool {
	if t == s {
		return true
	}

	if len(s) < len(t)-1 {
		return false
	}

	i := 0
	for ; i < len(t); i++ {
		if t[i] == '*' {
			break
		}

		if t[i] != s[i] {
			return false
		}
	}

	for j := 1; len(t) - j > i; j++ {
		if t[len(t) - j] != s[len(s) - j] {
			return false
		}
	}

	return true
}


package main

import (
	"bufio"
	"bytes"
	"fmt"
	"os"
)

var reader = bufio.NewReader(os.Stdin)
var out bytes.Buffer

func main() {
	var t int
	fmt.Fscan(reader, &t)

	for i := 0; i < t; i++ {
		var n string
		fmt.Fscan(reader, &n)

		fmt.Fprintln(&out, len(n))
	}

	fmt.Println(out.String())
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)

	var t int
	var n string
	fmt.Fscan(in, &t)

	for ; t > 0; t-- {
		fmt.Fscan(in, &n)
		fmt.Println(len([]rune(n)))
	}
}

/*
URL:
https://codeforces.com/contest/1455/problem/A
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

var (
	t int

	N []rune
)

func main() {
	defer stdout.Flush()

	t = readi()
	for tc := 0; tc < t; tc++ {
		N = readrs()
		printf("%d\n", len(N))
	}
}

/*******************************************************************/

/********** common constants **********/

const (
	MOD = 1000000000 + 7
	// MOD          = 998244353
	ALPH_N  = 26
	INF_I64 = math.MaxInt64
	INF_B60 = 1 << 60
	INF_I32 = math.MaxInt32
	INF_B30 = 1 << 30
	NIL     = -1
	EPS     = 1e-10
)

/********** bufio setting **********/

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	reads = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

// mod can calculate a right residual whether value is positive or negative.
func mod(val, m int) int {
	res := val % m
	if res < 0 {
		res += m
	}
	return res
}

// min returns the min integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func min(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m > integer {
			m = integer
		}
	}
	return m
}

// max returns the max integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func max(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m < integer {
			m = integer
		}
	}
	return m
}

// chmin accepts a pointer of integer and a target value.
// If target value is SMALLER than the first argument,
//	then the first argument will be updated by the second argument.
func chmin(updatedValue *int, target int) bool {
	if *updatedValue > target {
		*updatedValue = target
		return true
	}
	return false
}

// chmax accepts a pointer of integer and a target value.
// If target value is LARGER than the first argument,
//	then the first argument will be updated by the second argument.
func chmax(updatedValue *int, target int) bool {
	if *updatedValue < target {
		*updatedValue = target
		return true
	}
	return false
}

// sum returns multiple integers sum.
func sum(integers ...int) int {
	var s int
	s = 0

	for _, i := range integers {
		s += i
	}

	return s
}

// abs is integer version of math.Abs
func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

// pow is integer version of math.Pow
// pow calculate a power by Binary Power (二分累乗法(O(log e))).
func pow(a, e int) int {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := pow(a, halfE)
		return half * half
	}

	return a * pow(a, e-1)
}

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := reads()
//i := readi()
//X := readis(n)
//S := readrs()
//a := readf()
//A := readfs(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*********** Input ***********/

var (
	// reads returns a WORD string.
	reads  func() string
	stdout *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// readi returns an integer.
func readi() int {
	return int(_readInt64())
}
func readi2() (int, int) {
	return int(_readInt64()), int(_readInt64())
}
func readi3() (int, int, int) {
	return int(_readInt64()), int(_readInt64()), int(_readInt64())
}
func readi4() (int, int, int, int) {
	return int(_readInt64()), int(_readInt64()), int(_readInt64()), int(_readInt64())
}

// readll returns as integer as int64.
func readll() int64 {
	return _readInt64()
}
func readll2() (int64, int64) {
	return _readInt64(), _readInt64()
}
func readll3() (int64, int64, int64) {
	return _readInt64(), _readInt64(), _readInt64()
}
func readll4() (int64, int64, int64, int64) {
	return _readInt64(), _readInt64(), _readInt64(), _readInt64()
}

func _readInt64() int64 {
	i, err := strconv.ParseInt(reads(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// readis returns an integer slice that has n integers.
func readis(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = readi()
	}
	return b
}

// readlls returns as int64 slice that has n integers.
func readlls(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = readll()
	}
	return b
}

// readf returns an float64.
func readf() float64 {
	return float64(_readFloat64())
}

func _readFloat64() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func readfs(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = readf()
	}
	return b
}

// readrs returns a rune slice.
func readrs() []rune {
	return []rune(reads())
}

/*********** Output ***********/

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// Printf is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func printf(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*********** Debugging ***********/

// debugf is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func debugf(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

package main

import (
	"fmt"
)

func main() {
	var t int
	fmt.Scanf("%d\n", &t)
	for i := 0; i < t; i++ {
		var str string
		fmt.Scanf("%s\n", &str)
		fmt.Println(len(str))
	}
}

package main

import (
	"fmt"
)

func main() {
	var t int
	fmt.Scanf("%d\n", &t)
	fmt.Println(t)
	for i := 0; i < t; i++ {
		var str string
		fmt.Scanf("%s\n", &str)
		fmt.Println(len(str))
	}
}


package main

import (
	"bufio"
	"container/heap"
	. "fmt"
	"io"
	"os"
)

type pair struct {
	v int64
	i int
}
type hp []pair

func (h hp) Len() int            { return len(h) }
func (h hp) Less(i, j int) bool  { return h[i].v < h[j].v }
func (h hp) Swap(i, j int)       { h[i], h[j] = h[j], h[i] }
func (h *hp) Push(v interface{}) { *h = append(*h, v.(pair)) }
func (h *hp) Pop() interface{}   { a := *h; v := a[len(a)-1]; *h = a[:len(a)-1]; return v }
func (h *hp) push(v pair)        { heap.Push(h, v) }
func (h *hp) pop() pair          { return heap.Pop(h).(pair) }

// github.com/EndlessCheng/codeforces-go
func CF721D(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	abs := func(x int64) int64 {
		if x < 0 {
			return -x
		}
		return x
	}

	var n, k, x int64
	Fscan(in, &n, &k, &x)
	sign, minI := int64(1), 0
	a := make([]int64, n)
	for i := range a {
		Fscan(in, &a[i])
		if a[i] < 0 {
			sign = -sign
		}
		if abs(a[i]) < abs(a[minI]) {
			minI = i
		}
	}

	if sign > 0 {
		if abs(a[minI]) >= k*x {
			for i, v := range a {
				if i == minI {
					if v < 0 {
						v += k * x
					} else {
						v -= k * x
					}
				}
				Fprint(out, v, " ")
			}
			return
		}
		c := abs(a[minI])/x + 1
		if a[minI] < 0 {
			a[minI] += c * x
		} else {
			a[minI] -= c * x
		}
		k -= c
	}
	h := make(hp, n)
	for i, v := range a {
		h[i] = pair{abs(v), i}
	}
	heap.Init(&h)
	for ; k > 0; k-- {
		p := h.pop()
		h.push(pair{p.v + x, p.i})
	}
	ans := make([]interface{}, n)
	for _, p := range h {
		if a[p.i] < 0 {
			ans[p.i] = -p.v
		} else {
			ans[p.i] = p.v
		}
	}
	Fprint(out, ans...)
}

func main() { CF721D(os.Stdin, os.Stdout) }

package main

import (
	"bufio"
	"container/heap"
	. "fmt"
	"io"
	"os"
)

type pair struct {
	v int64
	i int
}
type hp []pair

func (h hp) Len() int            { return len(h) }
func (h hp) Less(i, j int) bool  { return h[i].v < h[j].v }
func (h hp) Swap(i, j int)       { h[i], h[j] = h[j], h[i] }
func (h *hp) Push(v interface{}) { *h = append(*h, v.(pair)) }
func (h *hp) Pop() interface{}   { a := *h; v := a[len(a)-1]; *h = a[:len(a)-1]; return v }

// github.com/EndlessCheng/codeforces-go
func CF721D(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	abs := func(x int64) int64 {
		if x < 0 {
			return -x
		}
		return x
	}

	var n, k, x int64
	Fscan(in, &n, &k, &x)
	sign, minI := int64(1), 0
	a := make([]int64, n)
	for i := range a {
		Fscan(in, &a[i])
		if a[i] < 0 {
			sign = -sign
		}
		if abs(a[i]) < abs(a[minI]) {
			minI = i
		}
	}

	if sign > 0 {
		if abs(a[minI]) >= k*x {
			for i, v := range a {
				if i == minI {
					if v < 0 {
						v += k * x
					} else {
						v -= k * x
					}
				}
				Fprint(out, v, " ")
			}
			return
		}
		c := abs(a[minI])/x + 1
		if a[minI] < 0 {
			a[minI] += c * x
		} else {
			a[minI] -= c * x
		}
		k -= c
	}
	h := make(hp, n)
	for i, v := range a {
		h[i] = pair{abs(v), i}
	}
	heap.Init(&h)
	for ; k > 0; k-- {
		p := h[0]
		p.v += x
		h[0] = p
		heap.Fix(&h, 0)
	}
	ans := make([]interface{}, n)
	for _, p := range h {
		if a[p.i] < 0 {
			ans[p.i] = -p.v
		} else {
			ans[p.i] = p.v
		}
	}
	Fprint(out, ans...)
}

func main() { CF721D(os.Stdin, os.Stdout) }

package main

import (
	"bufio"
	"container/heap"
	. "fmt"
	"io"
	"os"
)

type pair struct {
	v int64
	i int
}
type hp []pair

func (h hp) Len() int            { return len(h) }
func (h hp) Less(i, j int) bool  { return h[i].v < h[j].v }
func (h hp) Swap(i, j int)       { h[i], h[j] = h[j], h[i] }
func (h *hp) Push(v interface{}) { *h = append(*h, v.(pair)) }
func (h *hp) Pop() interface{}   { a := *h; v := a[len(a)-1]; *h = a[:len(a)-1]; return v }

// github.com/EndlessCheng/codeforces-go
func CF721D(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	abs := func(x int64) int64 {
		if x < 0 {
			return -x
		}
		return x
	}

	var n, k, x int64
	Fscan(in, &n, &k, &x)
	sign, minI := int64(1), 0
	a := make([]int64, n)
	for i := range a {
		Fscan(in, &a[i])
		if a[i] < 0 {
			sign = -sign
		}
		if abs(a[i]) < abs(a[minI]) {
			minI = i
		}
	}

	if sign > 0 {
		if abs(a[minI]) >= k*x {
			for i, v := range a {
				if i == minI {
					if v < 0 {
						v += k * x
					} else {
						v -= k * x
					}
				}
				Fprint(out, v, " ")
			}
			return
		}
		c := abs(a[minI])/x + 1
		if a[minI] < 0 {
			a[minI] += c * x
		} else {
			a[minI] -= c * x
		}
		k -= c
	}
	h := make(hp, n)
	for i, v := range a {
		h[i] = pair{abs(v), i}
	}
	heap.Init(&h)
	for ; k > 0; k-- {
		h[0].v += x
		heap.Fix(&h, 0)
	}
	ans := make([]interface{}, n)
	for _, p := range h {
		if a[p.i] < 0 {
			ans[p.i] = -p.v
		} else {
			ans[p.i] = p.v
		}
	}
	Fprint(out, ans...)
}

func main() { CF721D(os.Stdin, os.Stdout) }

package main

import (
	"bufio"
	"container/heap"
	. "fmt"
	"io"
	"os"
)

type pair struct {
	v int64
	i int
}
type hp []pair

func (h hp) Len() int            { return len(h) }
func (h hp) Less(i, j int) bool  { return h[i].v < h[j].v }
func (h hp) Swap(i, j int)       { h[i], h[j] = h[j], h[i] }
func (h *hp) Push(v interface{}) { *h = append(*h, v.(pair)) }
func (h *hp) Pop() interface{}   { a := *h; v := a[len(a)-1]; *h = a[:len(a)-1]; return v }
func (h *hp) push(v pair)        { heap.Push(h, v) }
func (h *hp) pop() pair          { return heap.Pop(h).(pair) }

// github.com/EndlessCheng/codeforces-go
func CF721D(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	abs := func(x int64) int64 {
		if x < 0 {
			return -x
		}
		return x
	}

	var n, k, x int64
	Fscan(in, &n, &k, &x)
	sign, minI := int64(1), 0
	a := make([]int64, n)
	for i := range a {
		Fscan(in, &a[i])
		if a[i] < 0 {
			sign = -sign
		}
		if abs(a[i]) < abs(a[minI]) {
			minI = i
		}
	}

	if sign > 0 {
		if abs(a[minI]) >= k*x {
			for i, v := range a {
				if i == minI {
					v -= sign * k * x
				}
				Fprint(out, v, " ")
			}
			return
		}
		c := abs(a[minI])/x + 1
		a[minI] -= sign * c * x
		k -= c
	}
	h := make(hp, n)
	for i, v := range a {
		h[i] = pair{abs(v), i}
	}
	heap.Init(&h)
	for ; k > 0; k-- {
		p := h.pop()
		h.push(pair{p.v + x, p.i})
	}
	ans := make([]interface{}, n)
	for _, p := range h {
		if a[p.i] < 0 {
			ans[p.i] = -p.v
		} else {
			ans[p.i] = p.v
		}
	}
	Fprint(out, ans...)
}

func main() { CF721D(os.Stdin, os.Stdout) }

package main

import (
	"bufio"
	"container/heap"
	. "fmt"
	"io"
	"os"
)

type pair struct {
	v int64
	i int
}
type hp []pair

func (h hp) Len() int            { return len(h) }
func (h hp) Less(i, j int) bool  { return h[i].v < h[j].v }
func (h hp) Swap(i, j int)       { h[i], h[j] = h[j], h[i] }
func (h *hp) Push(v interface{}) { *h = append(*h, v.(pair)) }
func (h *hp) Pop() interface{}   { a := *h; v := a[len(a)-1]; *h = a[:len(a)-1]; return v }
func (h *hp) push(v pair)        { heap.Push(h, v) }
func (h *hp) pop() pair          { return heap.Pop(h).(pair) }

// github.com/EndlessCheng/codeforces-go
func CF721D(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	abs := func(x int64) int64 {
		if x < 0 {
			return -x
		}
		return x
	}

	var n, k, x int64
	Fscan(in, &n, &k, &x)
	minI := 0
	a := make([]int64, n)
	for i := range a {
		Fscan(in, &a[i])
		if a[i] < a[minI] {
			minI = i
		}
	}

	if a[minI] >= k*x {
		for i, v := range a {
			if i == minI {
				v -= k * x
			}
			Fprint(out, v, " ")
		}
		return
	}
	if a[minI] >= 0 {
		c := a[minI]/x + 1
		a[minI] -= c * x
		k -= c
	}
	h := make(hp, n)
	for i, v := range a {
		h[i] = pair{abs(v), i}
	}
	heap.Init(&h)
	for ; k > 0; k-- {
		p := h.pop()
		h.push(pair{p.v + x, p.i})
	}
	ans := make([]interface{}, n)
	for _, p := range h {
		if a[p.i] < 0 {
			ans[p.i] = -p.v
		} else {
			ans[p.i] = p.v
		}
	}
	Fprint(out, ans...)
}

func main() { CF721D(os.Stdin, os.Stdout) }


package main

import (
	"bufio"
	"bytes"
	"fmt"
	"os"
	"sort"
)

func main() {
	reader := bufio.NewReader(os.Stdin)

	tc := readNum(reader)

	var buf bytes.Buffer

	for tc > 0 {
		tc--
		n := readNum(reader)
		A := readNNums(reader, n)
		res := solve(n, A)
		buf.WriteString(fmt.Sprintf("%d\n", res))
	}

	fmt.Print(buf.String())
}

func readInt(bytes []byte, from int, val *int) int {
	i := from
	sign := 1
	if bytes[i] == '-' {
		sign = -1
		i++
	}
	tmp := 0
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + int(bytes[i]-'0')
		i++
	}
	*val = tmp * sign
	return i
}

func readNum(reader *bufio.Reader) (a int) {
	bs, _ := reader.ReadBytes('\n')
	readInt(bs, 0, &a)
	return
}

func readTwoNums(reader *bufio.Reader) (a int, b int) {
	res := readNNums(reader, 2)
	a, b = res[0], res[1]
	return
}

func readThreeNums(reader *bufio.Reader) (a int, b int, c int) {
	res := readNNums(reader, 3)
	a, b, c = res[0], res[1], res[2]
	return
}

func readNNums(reader *bufio.Reader, n int) []int {
	res := make([]int, n)
	x := 0
	bs, _ := reader.ReadBytes('\n')
	for i := 0; i < n; i++ {
		for x < len(bs) && (bs[x] < '0' || bs[x] > '9') && bs[x] != '-' {
			x++
		}
		x = readInt(bs, x, &res[i])
	}
	return res
}

func readUint64(bytes []byte, from int, val *uint64) int {
	i := from

	var tmp uint64
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + uint64(bytes[i]-'0')
		i++
	}
	*val = tmp

	return i
}

func solve(n int, A []int) int {
	sort.Ints(A)

	i := 1
	for i < n && A[i] == A[0] {
		i++
	}
	return n - i
}

package main

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

type CF1487A struct {
	sc        *bufio.Reader
	split     []string
	index     int
	separator string
}

func (in *CF1487A) GetLine() string {
	line, err := in.sc.ReadString('\n')
	if err != nil {
		fmt.Println("error line:", line, " err: ", err)
	}
	in.split = []string{}
	in.index = 0
	return line
}
func (in *CF1487A) load() {
	if len(in.split) <= in.index {
		in.split = strings.Split(in.GetLine(), in.separator)
		in.index = 0
	}
}

func (in *CF1487A) NextInt() int {
	in.load()
	val, _ := strconv.Atoi(strings.TrimSpace(in.split[in.index]))
	in.index++
	return val
}

func (in *CF1487A) NextInt64() int64 {
	in.load()
	val, _ := strconv.ParseInt(strings.TrimSpace(in.split[in.index]), 10, 64)
	in.index++
	return val
}

func (in *CF1487A) NextString() string {
	in.load()
	val := strings.TrimSpace(in.split[in.index])
	in.index++
	return val
}

/**
Run solve the problem CF1487A
Date: 8/11/21
User: pepradere
URL: https://codeforces.com/problemset/problem/1487/A
Problem: CF1487A
**/
func (in *CF1487A) Run() {
	t := in.NextInt()
	for ; t > 0; t-- {
		n := in.NextInt()
		arr := make([]int, 101)
		for i := 0; i < n; i++ {
			num := in.NextInt()
			arr[num]++
		}

		find := false
		sol := 0
		for i := 0; i < 101; i++ {
			if find && arr[i] > 0 {
				sol += arr[i]
			}
			if arr[i] > 0 {
				find = true
			}
		}

		fmt.Println(sol)

	}
}

func NewCF1487A(r *bufio.Reader) *CF1487A {
	return &CF1487A{
		sc:        r,
		split:     []string{},
		index:     0,
		separator: " ",
	}
}

func main() {
	NewCF1487A(bufio.NewReader(os.Stdin)).Run()
}

package main

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

var (
	reader = bufio.NewReader(os.Stdin)
	t, n   int
)

func solve(n int, a []int) int {
	var (
		m = 101
		c int
	)
	for _, x := range a {
		if x < m {
			m = x
		}
	}
	for _, x := range a {
		if x == m {
			c++
		}
	}
	return n - c
}

func main() {
	fmt.Fscan(reader, &t)
	for ; t > 0; t-- {
		fmt.Fscan(reader, &n)
		a := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Fscan(reader, &a[i])
		}
		fmt.Println(solve(n, a))
	}
}

package main

import "fmt"

func main() {
	t := 0
	fmt.Scan(&t)
	for ; t > 0; t-- {
		n := 0
		fmt.Scan(&n)
		min_num, min_cnt := 105, 1
		for i := 0; i < n; i++ {
			x := 0
			fmt.Scan(&x)
			if x < min_num {
				min_num, min_cnt = x, 1
			} else if x == min_num {
				min_cnt++
			}
		}
		fmt.Println(n - min_cnt)
	}
}

package main

import (
	"bufio"
	"fmt"
	"io/ioutil"
	"math"
	"os"
	"strings"
)

var bytes []byte

func nextByte() byte {
	b := bytes[0]
	bytes = bytes[1:]
	return b
}

func scanInt64() int64 {
	var negative bool
	var result int64

	b := nextByte()

	for ; b < '0' || b > '9'; b = nextByte() {
		if b == '-' {
			negative = true
		}
	}

	for ; '0' <= b && b <= '9'; b = nextByte() {
		result = (result << 3) + (result << 1) + int64(b-'0')
	}

	if negative {
		return -result
	} else {
		return result
	}
}

func scanInt() int {
	return int(scanInt64())
}

func ScanString() string {
	builder := strings.Builder{}

	for b := nextByte(); b != '\r'; b = nextByte() {
		if b != '\n' {
			builder.WriteByte(b)
		}
	}

	return builder.String()
}

func init() {
	f, err := os.Open("in.txt")

	if err == nil {
		defer f.Close()
	} else {
		f = os.Stdin
	}

	bytes, _ = ioutil.ReadAll(bufio.NewReader(f))
}

func main() {
	for t := scanInt(); t > 0; t-- {
		n := scanInt()
		min, cnt := math.MaxInt32, 0

		for i := 0; i < n; i++ {
			a := scanInt()

			if a < min {
				min, cnt = a, i
			} else if a > min {
				cnt++
			}
		}

		fmt.Println(cnt)
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	var t, n int
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &n)
		a := make([]int, n)
		for j := 0; j < n; j++ {
			fmt.Fscan(in, &a[j])
		}
		min := findMin(a)
		c := countMin(a, min)
		fmt.Println(n - c)
	}
}

func findMin(a []int) int {
	min := math.MaxInt16
	n := len(a)
	for j := 0; j < n; j++ {
		if min > a[j] {
			min = a[j]
		}
	}
	return min
}

func countMin(a []int, min int) int {
	c := 0
	n := len(a)
	for j := 0; j < n; j++ {
		if min == a[j] {
			c++
		}
	}
	return c
}

package main

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

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

func main() {
	defer wr.Flush()
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 4096), 1e9)
	// this template is new version.
	// use getI(), getS(), getInts(), getF()
	t := getI()
	forEach(t, func(i int64) {
		heroes := getI()
		levels := getInts(heroes)
		sortInts(levels)
		idx := upperBound(levels, levels[0])
		out(len(levels) - idx)
	})
}

// !------- HELPERS -------!

func out(x ...interface{}) {
	fmt.Fprintln(wr, x...)
}

func printf(f string, a ...interface{}) {
	fmt.Fprintf(wr, f, a...)
}

func getI() int64 {
	s := getS()
	i := int64(0)
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int64(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int64(r - '0')
	}
	return i
}

func getF() float64 {
	sc.Scan()
	i, e := strconv.ParseFloat(sc.Text(), 64)
	if e != nil {
		panic(e)
	}
	return i
}

func getInts(N int64) []int64 {
	ret := make([]int64, N)
	for i := range ret {
		ret[i] = getI()
	}
	return ret
}

func getS() string {
	if !sc.Scan() {
		panic(sc.Err())
	}
	return sc.Text()
}

func sortInts(data []int64) {
	sort.Slice(data, func(i, j int) bool { return data[i] < data[j] })
}

func joinInts(s []int64) string {
	return strings.Trim(fmt.Sprintf("%v", s), "[]")
}

func forEach(n int64, fn func(int64)) {
	for i := int64(0); i < n; i++ {
		fn(i)
	}
}

// min, max, asub, abs
func max(a, b int64) int64 {
	if a > b {
		return a
	}
	return b
}

func min(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

// min for n entry
func nmin(a ...int64) int64 {
	ret := a[0]
	for _, e := range a {
		ret = min(ret, e)
	}
	return ret
}

// max for n entry
func nmax(a ...int64) int64 {
	ret := a[0]
	for _, e := range a {
		ret = max(ret, e)
	}
	return ret
}

func asub(a, b int64) int64 {
	if a > b {
		return a - b
	}
	return b - a
}

func abs(a int64) int64 {
	if a >= 0 {
		return a
	}
	return -a
}

func lowerBound(a []int64, x int64) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int64, x int64) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

package main

import (
	"bufio"
	. "fmt"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	var T, n, v int
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n)
		mi, c := 101, 0
		for i := 0; i < n; i++ {
			if Fscan(in, &v); v < mi {
				mi, c = v, n-1
			} else if v == mi {
				c--
			}
		}
		Fprintln(out, c)
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

var in = bufio.NewReader(os.Stdin)

func solve() {
	var n int
	fmt.Fscan(in, &n)
	arr := make([]int, n)
	for i := 0; i < len(arr); i++ {
		fmt.Fscan(in, &arr[i])
	}
	sort.Ints(arr)
	i := 1
	found := false
	for i < len(arr) {
		if arr[i-1] < arr[i] {
			found = true
			break
		}
		i++
	}
	if found == true {
		t := len(arr) - i
		fmt.Println(t)
	} else {
		fmt.Println(0)
	}

}

func main() {
	var test int
	fmt.Fscan(in, &test)
	for i := 0; i < test; i++ {
		solve()
	}
}

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

func main()  {
	s:=bufio.NewScanner(os.Stdin)
	s.Scan()
	l,_:=strconv.Atoi(s.Text())
	for i:=0; i<l;i++{
		s.Scan()
		s.Scan()
		str:=strings.Split(strings.Trim(strings.Trim(s.Text(), "\n"), "\r")," ")
		var m []int
		for j:=0; j<len(str); j++{
			p,_ := strconv.Atoi(str[j])
			m=append(m, p)
		}
		fmt.Println(fn(m))
	}
}

func fn(a []int)(res int){
	min:=101
	for i:=0; i<len(a); i++{
		if a[i] < min{
			min = a[i]
		}
	}
	for i:=0; i<len(a); i++{
		if a[i] > min{
			res++
		}
	}
	return res
}

package main

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

func main() {
	var tcs int
	in := bufio.NewReader(os.Stdin)
	_, _ = fmt.Fscan(in, &tcs)

	for tc := 0; tc < tcs; tc++ {
		var n int
		_, _ = fmt.Fscan(in, &n)
		arr := make([]int, n)
		hash := make([]int, 101)

		for i := 0; i < n; i++ {
			_, _ = fmt.Fscan(in, &arr[i])
			hash[arr[i]]++
		}

		found := 0
		for i := 0; i < 101; i++ {
			if hash[i] > 0 {
				found = hash[i]
				break
			}
		}

		fmt.Println(n - found)
	}
}

package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"sort"
)

func MIN(x, y int) int {
	if x > y {
		return y
	} else {
		return x
	}
}

func MAX(x, y int) int {
	if x > y {
		return x
	} else {
		return y
	}
}

func LCM(x, y int) int {
	if x >= y {
		initial := x
		for i := 1; i < y+2; i++ {
			if initial%y == 0 {
				break
			} else {
				initial = initial + x
			}

		}
		return initial
	} else {
		initial := y
		for i := 1; i < x+2; i++ {
			if initial%x == 0 {
				break
			} else {
				initial = initial + y
			}

		}
		return initial
	}
}

func IsItPrime(x int) bool {
	if x < 10 {
		if x == 2 || x == 3 || x == 5 || x == 7 {
			return true
		} else {
			return false
		}
	} else {
		j := 0
		k := math.Sqrt(float64(x))
		for m := 3; m <= int(k); {
			if x%m == 0 {
				j = 1
				break
			}
			m = m + 2
		}
		if j == 1 {
			return false
		} else {
			return true
		}
	}

}

// sort.Slice(arr, func(i, j int) bool {
// 	return arr[i] > arr[j]
// })
var t int

func main() {
	var input io.Reader = bufio.NewReader(os.Stdin)
	fmt.Fscan(input, &t)
	for o := 0; o < t; o++ {
		var n int
		fmt.Fscan(input, &n)

		ARRAY := make([]int, n)

		for i := 0; i < n; i++ {
			fmt.Fscan(input, &ARRAY[i])
		}

		sort.Ints(ARRAY)
		indesxx := 0
		for i := 1; i < n; i++ {
			if ARRAY[i] > ARRAY[0] {
				indesxx = i
				break
			}
		}
		if indesxx == 0 {
			fmt.Println(0)
		} else {
			fmt.Println(n - indesxx)
		}

	}

}

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

var (
	writer  = bufio.NewWriter(os.Stdout)
	scanner = bufio.NewScanner(os.Stdin)
)

func init() {
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 4096), 1e9)
}

func printf(f string, a ...interface{}) {
	fmt.Fprintf(writer, f, a...)
}

func sint64() int64 {
	s := sstring()
	i := int64(0)
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int64(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int64(r - '0')
	}
	return i
}

func sint64s(n int64) []int64 {
	a := make([]int64, n)
	for i := range a {
		a[i] = sint64()
	}
	return a
}

func sstring() string {
	if !scanner.Scan() {
		panic(scanner.Err())
	}
	return scanner.Text()
}

func main() {
	defer writer.Flush()
	for t := sint64(); t > 0; t-- {
		n := sint64()
		a := sint64s(n)
		printf("%d\n", sol(n, a))
	}
}

func sol(n int64, a []int64) int64 {
	sort.Slice(a, func(il, ir int) bool {
		return a[il] < a[ir]
	})
	for i := 1; i < len(a); i++ {
		if a[i-1] != a[i] {
			return int64(len(a) - i)
		}
	}
	return 0
}

package main

import (
	"fmt"
	"log"
	"os"
	"strings"
)

type bufferedReader struct {
	buf     [4096]byte
	ptr, sz int
	eof     bool
	ended   bool
	in      *os.File
}

func newReader(in *os.File) bufferedReader {
	var tmp [4096]byte
	return bufferedReader{tmp, 0, 0, false, false, in}
}

func (r *bufferedReader) isEof() bool {
	return r.eof
}

func (r *bufferedReader) load() {
	if r.ended {
		r.eof = true
		return
	}
	sz, err := r.in.Read(r.buf[:])
	r.sz = sz
	if sz < 4096 {
		r.ended = true
	}
	if err != nil {
		log.Fatal(err)
	}
	r.ptr = 0
}

func (r *bufferedReader) getChar() byte {
	if r.ptr == r.sz && !r.eof {
		r.load()
	}
	if r.ptr == r.sz || r.eof {
		r.eof = true
		return 0
	}
	r.ptr += 1
	return r.buf[r.ptr-1]
}

func (r *bufferedReader) skipNonIntChars() {
	for {
		c := r.getChar()
		if r.eof {
			break
		}
		if (c >= 48 && c <= 57) || (c == 45) {
			r.ptr -= 1
			break
		}
	}
}

func (r *bufferedReader) skipWhitespace() {
	for {
		c := r.getChar()
		if r.eof {
			break
		}
		if c != ' ' && c != '\n' && c != '\t' && c != '\r' {
			r.ptr -= 1
			break
		}
	}
}

func (r *bufferedReader) readInt() int {
	r.skipNonIntChars()
	var ans int = 0
	var neg bool = false
	fst := r.getChar()
	if fst == 45 {
		neg = true
	} else {
		ans = int(fst) - 48
	}
	for {
		c := r.getChar()
		if r.eof {
			break
		}
		if c >= 48 && c <= 57 {
			ans = ans*10 + int(c-48)
		} else {
			r.ptr -= 1
			break
		}
	}
	if neg {
		ans = -ans
	}
	return ans
}

func (r *bufferedReader) readString() string {
	r.skipWhitespace()
	sz := 0
	capacity := 2
	s := make([]byte, 2)
	for {
		c := r.getChar()
		if r.eof {
			break
		}
		if c == ' ' || c == '\n' || c == '\t' || c == '\r' {
			r.ptr--
			break
		}
		if sz == capacity {
			capacity <<= 1
			s1 := make([]byte, capacity)
			for i := 0; i < sz; i++ {
				s1[i] = s[i]
			}
			s = s1
		}
		s[sz] = c
		sz++
	}
	return string(s[:sz])
}

func main() {
	var in bufferedReader
	hostname, err := os.Hostname()
	if err != nil {
		log.Fatal(err)
	}
	if strings.HasSuffix(hostname, "lenovo") {
		file, _ := os.Open("input.txt")
		in = newReader(file)
	} else {
		in = newReader(os.Stdin)
	}
	T := in.readInt()
	for t := 0; t < T; t++ {
		n := in.readInt()
		a := make([]int, n)
		for i := 0; i < n; i++ {
			a[i] = in.readInt()
		}
		mi := 1488
		for i := 0; i < n; i++ {
			if a[i] < mi {
				mi = a[i]
			}
		}
		ans := 0
		for i := 0; i < n; i++ {
			if a[i] != mi {
				ans++
			}
		}
		fmt.Printf("%d\n", ans)
	}
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func CF1487A(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	var T, n, v int
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n)
		mi, c := 101, 0
		for i := 0; i < n; i++ {
			if Fscan(in, &v); v < mi {
				mi, c = v, n-1
			} else if v == mi {
				c--
			}
		}
		Fprintln(out, c)
	}
}

func main() { CF1487A(os.Stdin, os.Stdout) }

package main
import(
    "fmt"
    "bufio"
    "os"
)
func main() {
	in:= bufio.NewReader(os.Stdin)
	out:= bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var t int
	fmt.Fscan(in,&t)
	for i:=0;i<t;i++{
		var n int
		fmt.Fscan(in,&n)
		list:= make([]int,n)
		var smallest int
		for j:=0;j<n;j++{
			fmt.Fscan(in,&list[j])
			if j == 0 {
				smallest = list[j]
			} else {
				if list[j] < smallest {
					smallest= list[j]
				}
			}
		}
		var counter int
		for j:=0;j<n;j++{
			if list[j] > smallest {
				counter++
			}
		}
		fmt.Fprintln(out,counter)
	}
}

package main

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

func solve() {
	f := bufio.NewReader(os.Stdin)
	w := bufio.NewWriter(os.Stdout)
	N, n := 0, 0
	fmt.Fscan(f, &N)
	for i := 0; i < N; i++ {
		fmt.Fscan(f, &n)
		o, p, min, tot := []int{}, 0, 10000, 0
		for j := 0; j < n; j++ {
			fmt.Fscan(f, &p)
			o = append(o, p)
			if p < min {
				min = p
			}
		}
		for j := 0; j < n; j++ {
			if min == o[j] {
				tot++
			}
		}
		fmt.Fprintln(w, n-tot)
	}
	w.Flush()
}

func main() {
	solve()
}


package main

import(
	"fmt"
	// "sort"
	// "math"
	// "strconv"
	// "strings"
	"os"
	"bufio"
)

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
}

func toInt(buf []byte) (o int) {
	for _, v := range buf {
		o = o*10 + int(v-'0')
	}
	return
}

type pair struct {
	first int
	second uint8
}

type pairs []pair

func (a pairs) Len() int {return len(a)}
func (a pairs) Swap(i,j int) {a[i], a[j] = a[j], a[i]}
func (a pairs) Less(i,j int) bool {
	return a[i].first < a[j].first
	if a[i].first > a[j].first {
		return false
	}
	return a[i].second <= a[j].second
}

var a,cnt [1500]int

func main() {
	in := bufio.NewReader(os.Stdin)
	//in, _ := os.Open("a.txt")
	var n,ans,m int
	fmt.Fscanf(in, "%d\n", &n)
	for i := 0; i < n; i++ {
		if i == n - 1 {
			fmt.Fscanf(in, "%d\n", &a[i])
		} else {
			fmt.Fscanf(in, "%d ", &a[i])
		}
		a[i]--
		cnt[a[i]]++
		for j := a[i] + 1; j < n; j++ {
			ans += cnt[j]
		}
	}
	ans %= 2
	fmt.Fscanf(in, "%d\n", &m)
	for i := 0; i < m; i++ {
		var l,r int
		fmt.Fscanf(in, "%d %d\n", &l, &r)
		r -= l
		r *= r + 1
		r /= 2
		if r % 2 == 1 {
			ans ^= 1
		}
		if ans == 1 {
			fmt.Println("odd")
		} else {
			fmt.Println("even")
		}
	}
}

package main

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

func main() {
	fsc := NewFastScanner()
	N := fsc.NextInt()
	A := fsc.NextIntArray()
	M := fsc.NextInt()
	result := 0
	for i := 0; i < N; i++ {
		for j := 0; j < i; j++ {
			if A[i] < A[j] {
				result++
			}
		}
	}
	result = result % 2
	for i := 0; i < M; i++ {
		l, r := fsc.NextInt(), fsc.NextInt()
		cnt := r - l + 1
		res := cnt * (cnt - 1) / 2
		result = (result + res) % 2
		if result%2 == 0 {
			fmt.Println("even")
		} else {
			fmt.Println("odd")
		}
	}
}

//template
type FastScanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewFastScanner() *FastScanner {
	rdr := bufio.NewReaderSize(os.Stdin, 1024)
	return &FastScanner{r: rdr}
}
func (s *FastScanner) Next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}
func (s *FastScanner) NextLine() string {
	s.pre()
	start := s.p
	s.p = len(s.buf)
	return string(s.buf[start:])
}
func (s *FastScanner) NextInt() int {
	v, _ := strconv.Atoi(s.Next())
	return v
}
func (s *FastScanner) NextInt64() int64 {
	v, _ := strconv.ParseInt(s.Next(), 10, 64)
	return v
}

func (s *FastScanner) NextIntArray() []int {
	s.pre()
	start := s.p
	result := []int{}
	for ; s.p < len(s.buf)+1; s.p++ {
		if s.p == len(s.buf) || s.buf[s.p] == ' ' {
			v, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 0)
			result = append(result, int(v))
			start = s.p + 1
		}
	}

	return result
}

func (s *FastScanner) NextInt64Array() []int64 {
	s.pre()
	start := s.p
	result := []int64{}
	for ; s.p < len(s.buf)+1; s.p++ {
		if s.p == len(s.buf) || s.buf[s.p] == ' ' {
			v, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 64)
			result = append(result, v)
			start = s.p + 1
		}
	}
	return result
}

func (s *FastScanner) pre() {
	if s.p >= len(s.buf) {
		s.readLine()
		s.p = 0
	}
}
func (s *FastScanner) readLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, e := s.r.ReadLine()
		if e != nil {
			panic(e)
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}

//Max,Min
func IntMax(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func Int64Max(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}
func Float64Max(a, b float64) float64 {
	if a < b {
		return b
	}
	return a
}

func IntMin(a, b int) int {
	if a > b {
		return b
	}
	return a
}

func Int64Min(a, b int64) int64 {
	if a > b {
		return b
	}
	return a
}
func Float64Min(a, b float64) float64 {
	if a > b {
		return b
	}
	return a
}

//Gcd
func IntGcd(a, b int) int {
	if a < b {
		b, a = a, b
	}
	if b == 0 {
		return a
	}
	return IntGcd(b, a%b)
}
func Int64Gcd(a, b int64) int64 {
	if a < b {
		b, a = a, b
	}
	if b == 0 {
		return a
	}
	return Int64Gcd(b, a%b)
}

func IntAbs(a int) int {
	if a < 0 {
		a *= -1
	}
	return a
}

func Int64Abs(a int64) int64 {
	if a < 0 {
		a *= -1
	}
	return a
}

package main

import(
	"fmt"
	// "sort"
	// "math"
	// "strconv"
	// "strings"
	"os"
	"bufio"
)

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
}

func toInt(buf []byte) (o int) {
	for _, v := range buf {
		o = o*10 + int(v-'0')
	}
	return
}

type pair struct {
	first int
	second uint8
}

type pairs []pair

func (a pairs) Len() int {return len(a)}
func (a pairs) Swap(i,j int) {a[i], a[j] = a[j], a[i]}
func (a pairs) Less(i,j int) bool {
	return a[i].first < a[j].first
	if a[i].first > a[j].first {
		return false
	}
	return a[i].second <= a[j].second
}

var a,cnt [1500]int

func main() {
	in := bufio.NewReader(os.Stdin)
	//in, _ := os.Open("a.txt")
	var n,ans,m int
	fmt.Fscanf(in, "%d\n", &n)
	for i := 0; i < n; i++ {
		fmt.Fscanf(in, "%d", &a[i])
		a[i]--
		cnt[a[i]]++
		for j := a[i] + 1; j < n; j++ {
			ans += cnt[j]
		}
	}
	ans %= 2
	fmt.Fscanf(in, "%d\n", &m)
	for i := 0; i < m; i++ {
		var l,r int
		fmt.Fscanf(in, "%d %d\n", &l, &r)
		r -= l
		r *= r + 1
		r /= 2
		if r % 2 == 1 {
			ans ^= 1
		}
		if ans == 1 {
			fmt.Println("odd")
		} else {
			fmt.Println("even")
		}
	}
}


package main
import "fmt"
func main() {
	var a,ct,n,h int
	fmt.Scan(&n,&h)
	for i := 0; i < n; i++ {
	    fmt.Scan(&a)
	    if a>h {
	        ct += 2
	    }else {
	        ct += 1
	    }
	}
	fmt.Println(ct)
}

package main

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

func main() {
	heights, maxHeight := in3()
	res := sol(heights, maxHeight)
	out1(res)
}

// 31ms
func in1() ([]int64, int64) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	l1 := scanner.Text()
	scanner.Scan()
	l2 := scanner.Text()
	maxHeight, _ := strconv.Atoi(strings.Split(l1, " ")[1])
	heights := []int64{}
	for _, h := range strings.Split(l2, " ") {
		hint, _ := strconv.Atoi(h)
		heights = append(heights, int64(hint))
	}
	return heights, int64(maxHeight)
}

// 46ms
func in2() ([]int64, int64) {
	var n, maxHeight int64
	fmt.Scanf("%d %d\n", &n, &maxHeight)
	heights := []int64{}
	for ; n > 0; n-- {
		var h int64
		fmt.Scanf("%d", &h)
		heights = append(heights, h)
	}
	return heights, maxHeight
}

func scanf(reader *bufio.Reader, f string, a ...interface{}) {
	fmt.Fscanf(reader, f, a...)
}

func in3() ([]int64, int64) {
	reader := bufio.NewReader(os.Stdin)
	var n, maxHeight int64
	scanf(reader, "%d %d\n", &n, &maxHeight)
	heights := []int64{}
	for ; n > 0; n-- {
		var h int64
		scanf(reader, "%d", &h)
		heights = append(heights, h)
	}
	return heights, maxHeight
}

func out1(i int64) {
	fmt.Println(i)
}

func sol(heights []int64, max int64) int64 {
	ret := int64(0)
	for _, h := range heights {
		if h <= max {
			ret += 1
		} else {
			ret += 2
		}
	}
	return ret
}

package main

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

func main() {
    heights, maxHeight := in2()
    res := sol(heights, maxHeight)
    out1(res)
}

func in1() ([]int64, int64) {
    scanner := bufio.NewScanner(os.Stdin)
    scanner.Scan()
    l1 := scanner.Text()
    scanner.Scan()
    l2 := scanner.Text()
    maxHeight, _ := strconv.Atoi(strings.Split(l1, " ")[1])
    heights := []int64{}
    for _, h := range(strings.Split(l2, " ")) {
        hint, _ := strconv.Atoi(h)
        heights = append(heights, int64(hint))
    }
    return heights, int64(maxHeight)
}

func in2() ([]int64, int64) {
    var n, maxHeight int64
    fmt.Scanf("%d %d\n", &n, &maxHeight)
    heights := []int64{}
    for ; n > 0; n-- {
        var h int64
        fmt.Scanf("%d", &h)
        heights = append(heights, h)
    }
    return heights, maxHeight
}

func out1(i int64) {
    fmt.Println(i)
}

func sol(heights []int64, max int64) int64 {
    ret := int64(0)
    for _, h := range heights {
        if h <= max {
            ret += 1
        } else {
            ret += 2
        }
    }
    return ret
}

package main

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

var (
	reader *bufio.Reader = bufio.NewReader(os.Stdin)
	writer *bufio.Writer = bufio.NewWriter(os.Stdout)
)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
    defer writer.Flush()

    var n, mh int64
    scanf("%d %d\n", &n, &mh)
    heights := make([]int64, n)
    for ; n > 0; n-- {
        var h int64
        scanf("%d", &h)
        heights[n-1] = h
    }
    res := 0
    for _, h := range heights {
        if h <= mh {
            res += 1
        } else {
            res += 2
        }
    }
    printf("%d", res)
}

package main

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

func main() {
    heights, maxHeight := in1()
    res := sol(heights, maxHeight)
    out1(res)
}

func in1() ([]int64, int64) {
    scanner := bufio.NewScanner(os.Stdin)
    scanner.Scan()
    l1 := scanner.Text()
    scanner.Scan()
    l2 := scanner.Text()
    maxHeight, _ := strconv.Atoi(strings.Split(l1, " ")[1])
    heights := []int64{}
    for _, h := range(strings.Split(l2, " ")) {
        hint, _ := strconv.Atoi(h)
        heights = append(heights, int64(hint))
    }
    return heights, int64(maxHeight)
}

func out1(i int64) {
    fmt.Println(i)
}

func sol(heights []int64, max int64) int64 {
    ret := int64(0)
    for _, h := range heights {
        if h <= max {
            ret += 1
        } else {
            ret += 2
        }
    }
    return ret
}

package main

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

var (
	reader *bufio.Reader = bufio.NewReader(os.Stdin)
	writer *bufio.Writer = bufio.NewWriter(os.Stdout)
)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
    defer writer.Flush()

    var n, mh int64
    scanf("%d %d\n", &n, &mh)
    res := 0
    for ; n > 0; n-- {
        var h int64
        scanf("%d", &h)
        if h <= mh {
            res += 1
        } else {
            res += 2
        }
    }
    printf("%d", res)
}

package main;

import "fmt"

func main() {
	var n, h, w int
	fmt.Scan(&n, &h)

	w = 0
	for i:=0;i<n;i++ {
		var t int
		fmt.Scan(&t)
		if t>h {
			w += 2
		} else {
			w += 1
		}
	}
	fmt.Println(w)
}

package main

import "fmt"

func main ()  {
	var n, h int
	minWidth := 0
	fmt.Scan(&n, &h)
	for i := 0; i < n; i ++ {
		var currentHight int
		fmt.Scan(&currentHight)
		if currentHight > h {
			minWidth += 2
		} else {
			minWidth ++
		}
	}
	fmt.Println(minWidth)
}

package main

import 	"fmt"

func main() {
	var n, h int
	var a [1001]int
	x:=0
	fmt.Scanf("%d%d", &n, &h)

	for i:=0; i<n + 1; i++{
		fmt.Scanf("%d", &a[i])
		if a[i] > h {
			x +=2
		}else{
			x++
		}
	}

	fmt.Println(x-1)
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	var n, h, o,s uint16
	fmt.Fscanf(in, "%d %d\n", &n, &h)
	for i:=0; uint16(i) < n; i++{
		fmt.Fscanf(in, "%d", &o)
		if o > h{
			s+=2
		}else{
			s++
		}
	}
	fmt.Println(s)
}

package main

import (
	"fmt"
)

func main() {
	var n,h,temp,bend int
	fmt.Scanf("%d %d\n",&n,&h)
	for i:= 0 ; i < n ; i++{
		fmt.Scanf("%d",&temp)
		if(temp > h){
			bend+=1
		}
	}
	fmt.Println((n-bend) + (bend*2))
}

// MIT License
//
// Copyright (c) 2017 Nobi Hoang <nobi.hoa@gmail.com>
//
// http://codeforces.com/problemset/problem/677/A
//

package main

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

// ReadLine reads a line from the command line.
// It returns the line and an error if that fails.
func ReadLine() (string, error) {
  line, err := bufio.NewReader(os.Stdin).ReadString('\n')
  if err != nil {
    return "", err
  }
  return strings.TrimSpace(string(line)), nil
}

// Execute run
func Execute() {
  var n, h int
  fmt.Scanf("%d %d\n", &n, &h)

  var a = make([]int, n)
  s, _ := ReadLine()
  for i, str := range strings.Split(s, " ") {
    num, _ := strconv.Atoi(str)
    a[i] = num
  }

  sum := 0
  for i := 0; i < n; i++ {
    if a[i] > h  {
      sum += 2
    } else {
      sum++
    }
  }
  fmt.Println(sum)
}

func main() {
  Execute()
}

package main

import "fmt"

func main() {
	var n, h, a int
	var count int = 0
	fmt.Scan(&n, &h)
	for i := 1; i <= n; i++ {
		fmt.Scan(&a)
		if a <= h {
			count += 1
		} else if a > h {
			count += 2
		}
	}
	fmt.Print(count)
}

package main

import "fmt"

func main() {
	var n, t int
	fmt.Scan(&n, &t)
	ans := 0
	for ; n > 0; n-- {
		var x int
		fmt.Scan(&x)
		if x <= t {
			ans++
		} else {
			ans += 2
		}
	}
	fmt.Println(ans)
}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	defer writer.Flush()

	var (
		n    int
		h    int
		a    int
		road int
	)

	scanf("%d %d\n", &n, &h)

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

		if a > h {
			road += 2
		} else {
			road++
		}
	}

	printf("%d\n", road)
}

package main

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

var scanner *bufio.Scanner
func read() string {
    if !scanner.Scan() {
		panic("Scan returned false")
	}
	return scanner.Text()
}
func readInt() int {
	num, _ := strconv.Atoi(read())
	return num
}
func main() {
    scanner = bufio.NewScanner(os.Stdin)
    scanner.Split(bufio.ScanWords)
    n := readInt()
    h := readInt()

    cnt := n
    for i := 0 ; i < n; i++ {
        ai := readInt()

        if ai > h {
            cnt++
        }
    }

    fmt.Println(cnt)
}

package main
import (
	 "fmt"
)

func main() {
	 var n, x, kol int

	 fmt.Scanf("%d%d", &n, &x)
	 for i := 0; i<n; i ++ {
	 	   var a int
	 	   fmt.Scan(&a)

	 	   if a > x {
	 	   	kol += 2
	 	   } else {
	 	   	kol ++
	 	   }
	 }

	 fmt.Printf("%d", kol)
}

package main

import "fmt"

func main() {
	var n, h int
	fmt.Scan(&n, &h)
	var total int
	for i := 0; i < n; i++ {
		var height int
		fmt.Scan(&height)
		if height > h {
			total += 2
		} else {
			total++
		}
	}
	fmt.Print(total)
}

package main

import "fmt"

func main() {
	var n, h int
	fmt.Scan(&n)
	fmt.Scan(&h)

	var a int
	w := 0
	for i := 0; i < n; i++ {
		fmt.Scan(&a)
		if a > h {
			w += 2
		} else {
			w++
		}
	}
	fmt.Print(w)
}

package main

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

func main() {
	var myStrings [2]string
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 2; i++ {
		scanner.Scan()
		myStrings[i] = scanner.Text()
	}

	initialization := strings.Split(myStrings[0], " ")
	listOfFriendsHeights := strings.Split(myStrings[1], " ")
	h, _ := strconv.Atoi(initialization[1])
	var roadWidth int
	for _, friendHeight := range listOfFriendsHeights {
		friendHeight, _ := strconv.Atoi(friendHeight)
		if friendHeight > h {
			roadWidth++
		}
		roadWidth++
	}
	fmt.Println(roadWidth)
}

package main
import "fmt"

func main(){
	    var n, h, counter, value int
		fmt.Scan(&n)
		fmt.Scan(&h)

		for i := 0; i < n; i++ {
	    	fmt.Scan(&value)
	    	if value > h {
	    		counter += 2
	    	} else {
	    		counter += 1
	    	}
	    }
	    fmt.Println(counter)
}

package main

import "fmt"

func main() {
	var n, h int
	fmt.Scanf("%d %d\n", &n, &h)
	ret := 0

	for i := 0; i < n; i++ {
		var tmp = 0
		fmt.Scanf("%d", &tmp)
		if tmp > h {
			ret += 2
		} else {
			ret += 1
		}
	}

	fmt.Printf("%d\n", ret)
}

package main

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

func main() {
	var n, h, m, a int
	var scanner *bufio.Scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	//var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

	scanner.Scan()
	n, _ = strconv.Atoi(scanner.Text())
	scanner.Scan()
	h, _ = strconv.Atoi(scanner.Text())

	for m = n; n > 0; n-- {
		scanner.Scan()
		a, _ = strconv.Atoi(scanner.Text())
		if a > h {
			m++
		}
	}

	fmt.Println(m)
}

package main

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

func main() {
	var n, h, m, a int
	var writer *bufio.Writer = bufio.NewWriter(os.Stdout)
	var scanner *bufio.Scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)

	scanner.Scan()
	n, _ = strconv.Atoi(scanner.Text())
	scanner.Scan()
	h, _ = strconv.Atoi(scanner.Text())

	for m = n; n > 0; n-- {
		scanner.Scan()
		a, _ = strconv.Atoi(scanner.Text())
		if a > h {
			m++
		}
	}

	writer.WriteString(strconv.Itoa(m))
	writer.Flush()
}

package main

import "fmt"

func main() {
	var n, h, m, a int

	fmt.Scan(&n, &h)

	for m = n; n > 0; n-- {
		fmt.Scan(&a)
		if a > h {
			m++
		}
	}

	fmt.Println(m)
}

package main

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

func main() {
	var h, d, n, cnt int64

	scr := bufio.NewReader(os.Stdin)
	// ocr := bufio.NewWriter(os.Stdout)

	fmt.Fscanln(scr, &n, &h)

	for i := int64(0); i < n; i++ {
		fmt.Fscanf(scr, "%d", &d)
		if d > h {
			cnt += 2
		} else {
			cnt++
		}
	}
	fmt.Println(cnt)
}

package main

import "fmt"

func main() {
	var n, h, a int
	fmt.Scanf("%d %d\n", &n, &h)
	count := 0
	for i := 0; i < n; i++ {
		fmt.Scanf("%d", &a)
		if a > h {
			count++
		}
	}
	fmt.Println(count + n)
}

package main

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

func main() {
	var result int64
	reader := bufio.NewReader(os.Stdin)
	tmp := readInt64Slice(reader, 2)
	n, h := tmp[0], tmp[1]
	tmp = readInt64Slice(reader, int(n))
	for i := 0; i < len(tmp); i++ {
		if tmp[i] > h {
			result += 2
		} else {
			result++
		}
	}
	fmt.Println(result)
}

func readOneInt64(r *bufio.Reader) (n int64) {
	bytes, _ := r.ReadBytes('\n')
	n, _ = strconv.ParseInt(string(bytes[:len(bytes)-2]), 10, 64)
	return
}

func readInt64Slice(r *bufio.Reader, n int) (slice []int64) {
	var bytes []byte
	slice = make([]int64, n)
	n--
	for i := 0; i < n; i++ {
		bytes, _ = r.ReadBytes(' ')
		slice[i], _ = strconv.ParseInt(string(bytes[:len(bytes)-1]), 10, 64)
	}
	slice[n] = readOneInt64(r)
	return
}

//func readOneString(r *bufio.Reader) []byte {
//	bytes, _ := r.ReadBytes('\n')
//	return bytes[:len(bytes)-2]
//}

package main

import "fmt"

func main() {
	var n, h, w, a int

	fmt.Scan(&n, &h)
	for i := 0; i < n; i++ {
		fmt.Scan(&a)
		if a > h {
			w += 2
		} else {
			w += 1
		}
	}

	fmt.Println(w)
}

package main

import "fmt"

func main() {
	n := 0
	h := 0

	fmt.Scan(&n, &h)

	a := 0
	w := 0
	for i:= 0; i < n; i ++ {
		fmt.Scan(&a)
		if a <= h {
			w += 1
		} else {
			w += 2
		}
	}
	fmt.Print(w)
}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var p, fh, w int
	scanf("%d %d\n", &p, &fh)
	for i := 0; i < p; i++ {
		var height int
		scanf("%d", &height)
		if height > fh {
			w += 2
		} else {
			w++
		}
	}
	printf("%d\n", w)
}

	package main

	import "fmt"

	func main() {

		var number, height,i int16
		_, _ = fmt.Scan(&number)
		_, _ = fmt.Scan(&height)

		var oned = make([]int16,number)

		for i=0;i<number;i++ {
			_, _ = fmt.Scan(&oned[i])
		}

		count :=0
		for i=0;i<number;i++ {
			for oned[i] > 0{
				count++
				oned[i] = oned[i] - height
			}
		}
		fmt.Print(count)

	}

// A. Vanya and Fence
/*
Vanya and his friends are walking along the fence of height h and they do not
want the guard to notice them. In order to achieve this the height of each of
the friends should not exceed h. If the height of some person is greater
than h he can bend down and then he surely won't be noticed by the guard.
The height of the i-th person is equal to ai.

Consider the width of the person walking as usual to be equal to 1, while the
width of the bent person is equal to 2. Friends want to talk to each other
while walking, so they would like to walk in a single row. What is the
minimum width of the road, such that friends can walk in a row and remain
unattended by the guard?

Input
The first line of the input contains two integers n and h
(1 ≤ n ≤ 1000, 1 ≤ h ≤ 1000) — the number of friends and the height of the
fence, respectively.

The second line contains n integers ai (1 ≤ ai ≤ 2h), the i-th of them is
equal to the height of the i-th person.

Output
Print a single integer — the minimum possible valid width of the road.
Examples
Input
3 7
4 5 14

Output
4

Input
6 1
1 1 1 1 1 1

Output
6

Input
6 5
7 6 8 9 10 5

Output
11

Note
In the first sample, only person number 3 must bend down, so the required
width is equal to 1 + 1 + 2 = 4.

In the second sample, all friends are short enough and no one has to bend,
so the width 1 + 1 + 1 + 1 + 1 + 1 = 6 is enough.

In the third sample, all the persons have to bend, except the last one.
The required minimum width of the road is equal to 2 + 2 + 2 + 2 + 2 + 1 = 11.
*/
package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	input1, _ := reader.ReadString('\n')
	s1 := strings.Split(strings.TrimSpace(input1), " ")

	n, _ := strconv.Atoi(s1[0])
	h, _ := strconv.Atoi(s1[1])

	input2, _ := reader.ReadString('\n')
	s2 := strings.Split(strings.TrimSpace(input2), " ")

	width := n
	for i := 0; i < n; i++ {
		a, _ := strconv.Atoi(s2[i])
		if a > h {
			width++
		}
	}
	fmt.Print(width)
}

package main

import(
    "fmt"
)

type u32 uint32

func main(){
    var (
        n,h,i,res,temp u32
    )
    fmt.Scan(&n,&h)
    for i=0;i<n;i++{
        fmt.Scan(&temp)
        if temp > h{
            res +=2
        }else{
            res+=1
        }
    }
    fmt.Println(res)
}

package main

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

func main() {
	var n, h int
	var count = 0
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	str := strings.Fields(scanner.Text())
	n , _ = strconv.Atoi(str[0])
	h , _ = strconv.Atoi(str[1])
	scanner.Scan()
	arr := strings.Fields(scanner.Text())
	array := make([]int, n, n)
	for num, element := range arr {
		el, _ := strconv.Atoi(element)
		array[num] = el
	}
	for _, num := range array {
		if num > h {
			count += 2
		} else {
			count++
		}
	}
	fmt.Println(count)
}

package main

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

func main() {
	fsc := NewFastScanner()
	N, K := fsc.NextInt(), fsc.NextInt()
	ans := 0
	for i := 0; i < N; i++ {
		var height int
		height = fsc.NextInt()
		if height > K {
			ans += 2
		} else {
			ans += 1
		}
	}
	fmt.Println(ans)
}

//template
type FastScanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewFastScanner() *FastScanner {
	rdr := bufio.NewReaderSize(os.Stdin, 2028)
	return &FastScanner{r: rdr}
}

func (s *FastScanner) next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}

func (s *FastScanner) NextInt() int {
	val, err := strconv.Atoi(s.next())
	if err != nil {
		panic(err)
	}
	return val
}
func (s *FastScanner) NextInt64() int64 {
	val, err := strconv.ParseInt(s.next(), 10, 64)
	if err != nil {
		panic(err)
	}
	return val
}
func (s *FastScanner) pre() {
	if s.p >= len(s.buf) {
		s.ReadLine()
		s.p = 0
	}
}

func (s *FastScanner) ReadLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, err := s.r.ReadLine()
		if err != nil {
			panic(err.Error())
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}

package main

import (
	"fmt"
)

func solve(a []int, h int) int {
	w := len(a)
	for _, ai := range a {
		if ai > h {
			w ++
		}
	}
	return w
}

func main() {
	n, h := 0, 0
	_, err := fmt.Scanln(&n, &h)
	if err != nil {
		panic(err)
	}
	a := make([]int, n)
	pa := make([]interface{}, n)
	for i := range a {
		pa[i] = &a[i]
	}
	_, err = fmt.Scanln(pa...)
	if err != nil {
		panic(err)
	}
	w := solve(a, h)
	fmt.Println(w)
}

package main

import "fmt"

func main() {
	var n, h, a int
	fmt.Scan(&n, &h)

	ans := n
	for range make([]struct{}, n) {
		fmt.Scan(&a)
		if a > h {
			ans++
		}
	}
	fmt.Println(ans)
}

package main

import (
  "fmt"
)

func main() {
  var n,h,a,s int
  fmt.Scan(&n,&h)
  for i := 0; i < n; i++ {
    fmt.Scan(&a)
    if a <= h {
      s += 1
    } else {
      s += 2
    }
  }
  fmt.Print(s)
}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)
func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {
  // STDOUT MUST BE FLUSHED MANUALLY!!!
  defer writer.Flush()

  var n, h int
  sum := 0
  scanf("%d%d\n", &n, &h)
  for i := 0; i < n; i++ {
    var a int
    scanf("%d", &a)
    if a > h {
        sum += 1
    }
  }
  printf("%d", sum + n)
}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func scan(a ...interface{}) {
	fmt.Fscan(reader, a...)
}

func Println(a ...interface{}) {
	fmt.Println(a...)
}

func main() {
	var n, h int
	scan(&n, &h)
	width := 0
	for i := 0; i < n; i++ {
		var k int
		scan(&k)
		if k > h {
			width += 2
		} else {
			width++
		}
		//Println(k)
	}
	Println(width)
}

package main

import "fmt"

func main() {
	n, h, a, sum := 0,0,0,0
	fmt.Scan(&n, &h)

	for i := 0; i < n; i++ {
		fmt.Scan(&a)
		if (a > h) {
			sum++
		}
		sum++
	}
	fmt.Println(sum)
}

package main

import (
	"fmt"
)

func main() {
	var n, h, temp int
	fmt.Scanf("%d %d \n", &n, &h)
	result := n
	for i := 0; i < n; i++ {
		fmt.Scanf("%d", &temp)
		if temp > h {
			result++
		}
	}
	fmt.Print(result)
}

package main

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

func main() {
	var scanner *bufio.Scanner
	var lines []string
	var n, h int
	var heights []int
	var bent int = 0

	scanner = bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		lines = append(lines, scanner.Text())
	}

	var nh = strings.Fields(lines[0])
	n, _ = strconv.Atoi(nh[0])
	h, _ = strconv.Atoi(nh[1])

	var height int
	for _, element := range strings.Fields(lines[1]) {
		height, _ = strconv.Atoi(element)
		heights = append(heights, height)
	}

	for _, height := range heights {
		if height > h {
			bent++
		}
	}

	fmt.Println((bent + n))
}

package main

import "fmt"

func main() {
	var (
		n,max,x,sum	 int
	)
	sum = 0
	fmt.Scan(&n,&max)
	for i := 0; i < n; i++{
		fmt.Scan(&x)
		if x>max {
			sum+=2
		}else{
			sum++
		}
	  }
	fmt.Println(sum)
}

package main

import "fmt"

// https://codeforces.com/problemset/problem/677/A
// A. Vanya and Fence
// time limit per test
// 1 second
// memory limit per test
// 256 megabytes
// input
// standard input
// output
// standard output

// Vanya and his friends are walking along the fence of height h and they do not want the guard to notice them. In order to achieve this the height of each of the friends should not exceed h. If the height of some person is greater than h he can bend down and then he surely won't be noticed by the guard. The height of the i-th person is equal to ai.

// Consider the width of the person walking as usual to be equal to 1, while the width of the bent person is equal to 2. Friends want to talk to each other while walking, so they would like to walk in a single row. What is the minimum width of the road, such that friends can walk in a row and remain unattended by the guard?
// Input

// The first line of the input contains two integers n and h (1 ≤ n ≤ 1000, 1 ≤ h ≤ 1000) — the number of friends and the height of the fence, respectively.

// The second line contains n integers ai (1 ≤ ai ≤ 2h), the i-th of them is equal to the height of the i-th person.
// Output

// Print a single integer — the minimum possible valid width of the road.

func main() {
	var n, h int
	fmt.Scan(&n, &h)

	peoplesHeights := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&peoplesHeights[i])
	}

	var minWidth int
	for _, height := range peoplesHeights {
		if height > h {
			minWidth += 2
		} else {
			minWidth++
		}
	}
	fmt.Print(minWidth)
}

package main

import "fmt"

func main()  {
	var n, h, res int
	fmt.Scanf("%d %d\n", &n, &h)
	for i, tmp := 0, 0; i < n; i++ {
		fmt.Scanf("%d", &tmp)
		if tmp > h {
			res += 2
		} else {
			res++
		}
	}
	fmt.Println(res)

}

package main

import (
	"fmt"
)

func main() {
	var r int
	var i int
	fmt.Scan(&i)
	var x int
	fmt.Scan(&x)
	for  q:=0;q<i ;q++  {
		var z int
		fmt.Scan(&z)

		r += z/x
		if (z%x) >0{
			r++
		}
	}

	fmt.Println(r)

}

package main

import (
	"fmt"
	"math"
)

func main() {
	var r float64
	var i int
	fmt.Scan(&i)
	var x int
	fmt.Scan(&x)
	for  q:=0;q<i ;q++  {
		var z int
		fmt.Scan(&z)

		r += math.Ceil(float64(z)/float64(x))
	}

	fmt.Println(r)

}

package main

import "fmt"

func main() {
	var (
		n            int
		heightOfWall int
	)
	fmt.Scanf("%d %d\n", &n, &heightOfWall)
// 	fmt.Println(n, heightOfWall)
	var heights []int
	for i := 0; i < n; i++ {
		var h int
		fmt.Scanf("%d", &h)
		heights = append(heights, h)
	}
// 	fmt.Println(heights)
	var width int
	for _, h := range heights {
	   // fmt.Println(h, heightOfWall, h > heightOfWall)
		width += 1
		if h > heightOfWall {
			width += 1
		}
	}
	fmt.Println(width)
}

package main
import "fmt"

func main() {
	var n int
	var h int
	fmt.Scan(&n,&h)
	var ai int
	 sum :=0
	for i:= 0;i<n;i++ {
		fmt.Scan(&ai)
		if ai>h {
				sum=sum+2
			}else {
				sum=sum+1
			}
		}
			fmt.Print(sum)
}

package main

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

var (
	reader *bufio.Reader = bufio.NewReader(os.Stdin)
	writer *bufio.Writer = bufio.NewWriter(os.Stdout)
)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
    defer writer.Flush()

    var n, mh, h int64
    scanf("%d %d\n", &n, &mh)
    res := 0
    for ; n > 0; n-- {
        scanf("%d", &h)
        if h <= mh {
            res += 1
        } else {
            res += 2
        }
    }
    printf("%d", res)
}

package main

import "fmt"

func main() {
	var n, h, x int
	total:= 0
	fmt.Scanf("%d %d\n", &n, &h)

	for i:=0; i < n; i++ {
		fmt.Scanf("%d", &x)
		total++
		if x > h {
			total++
		}
	}

	fmt.Println(total)
}

package main

import "fmt"

func main() {
	var n int
	var h int
	fmt.Scan(&n)
	fmt.Scan(&h)

	var sum int
	sum = 0
	for i := 0; i < n; i++ {
		var ai int
		fmt.Scan(&ai)
		if ai > h {
			sum += 2
		} else {
			sum += 1
		}
	}
	fmt.Println(sum)

}

package main

import (
	"fmt"
)

func main() {
	var n , a int
	res := 0
	fmt.Scanf("%d %d\n", &n, &a)
	for i := 0; i < n; i++ {
		var tmp int
		fmt.Scanf("%d", &tmp)
		if tmp > a {
			res += 2
		}else{
			res += 1
		}

	}
	fmt.Println(res)
}

package main

import "fmt"

func main() {
	var n, h, a int
	var count int = 0
	fmt.Scan(&n, &h)
	for i := 0; i < n; i++ {
		fmt.Scan(&a)
		if a <= h {
			count += 1
		} else if a > h {
			count += 2
		}
	}
	fmt.Print(count)
}

package main

import "fmt"

func main() {
	var n, h int
	fmt.Scan(&n)
	fmt.Scan(&h)

	var x int
	output := 0
	for i := 0; i < n; i++ {
		fmt.Scan(&x)
		if x <= h {
			output++
		} else {
			output += 2
		}
	}
	fmt.Println(output)
}

package main

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

func main() {
	n := getInt()
	h := getInt()
	ans := n
	for i := 0; i < n; i++ {
		a := getInt()
		if a > h {
			ans++
		}
	}
	fmt.Println(ans)
}

type Input struct {
	*bufio.Scanner
}

var globalInput = wrapStdin()

func wrapStdin() Input {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	return Input{Scanner: sc}
}
func getInt() int {
	globalInput.Scan()
	x, _ := strconv.Atoi(globalInput.Text())
	return x
}
func getIntOk() (int, bool) {
	ok := globalInput.Scan()
	x, _ := strconv.Atoi(globalInput.Text())
	return x, ok
}
func getNint(n int) []int {
	v := make([]int, n)
	for i := 0; i < n; i++ {
		v[i] = getInt()
	}
	return v
}
func getVint(v []int) bool {
	var ok bool
	for i := 0; i < len(v); i++ {
		v[i], ok = getIntOk()
	}
	return ok
}
func getWord() string {
	globalInput.Scan()
	return globalInput.Text()
}
func getWordOk() (string, bool) {
	ok := globalInput.Scan()
	return globalInput.Text(), ok
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}
func min64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}
func max64(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}
func minStr(a, b string) string {
	if a < b {
		return a
	}
	return b
}
func maxStr(a, b string) string {
	if a < b {
		return b
	}
	return a
}
func remin(a *int, b int) bool {
	if b < *a {
		*a = b
		return true
	}
	return false
}
func remax(a *int, b int) bool {
	if b > *a {
		*a = b
		return true
	}
	return false
}
func remin64(a *int64, b int64) bool {
	if b < *a {
		*a = b
		return true
	}
	return false
}
func remax64(a *int64, b int64) bool {
	if b > *a {
		*a = b
		return true
	}
	return false
}
func reminStr(a *string, b string) bool {
	if b < *a {
		*a = b
		return true
	}
	return false
}
func remaxStr(a *string, b string) bool {
	if b > *a {
		*a = b
		return true
	}
	return false
}

func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}
func abs64(x int64) int64 {
	if x < 0 {
		return -x
	}
	return x
}

type (
	FLess    func(i, j int) bool
	FSwap    func(i, j int)
	wrapSort struct {
		Length int
		FLess
		FSwap
	}
)

func (w *wrapSort) Len() int           { return w.Length }
func (w *wrapSort) Less(i, j int) bool { return w.FLess(i, j) }
func (w *wrapSort) Swap(i, j int)      { w.FSwap(i, j) }
func wsort(length int, fless func(i, j int) bool, fswap func(i, j int)) {
	sort.Sort(&wrapSort{length, fless, fswap})
}

package main

// https://codeforces.com/problemset/problem/677/A

import "fmt"

func taskSolution(a []int, h int) int {
	ans := len(a)
	for _, ai := range a {
		if ai > h {
			ans += 1
		}
	}
	return ans
}

func main() {
	var n, h int
	if _, err := fmt.Scan(&n, &h); err != nil {
		panic(err)
	}

	a := []int{}
	for i := 0; i < n; i += 1 {
		var ai int
		if _, err := fmt.Scan(&ai); err != nil {
			panic(err)
		}
		a = append(a, ai)
	}

	fmt.Println(taskSolution(a, h))
}

package main

import "fmt"

func main() {
	var noPersons int
	var fenceHeight int
	var heightOfPerson int
	fmt.Scan(&noPersons, &fenceHeight)
	var minRoadWidth int = noPersons
	for index := 0; index < noPersons; index++ {
		fmt.Scan(&heightOfPerson)
		if heightOfPerson > fenceHeight {
			minRoadWidth = minRoadWidth + 1
		}
	}
	fmt.Print(minRoadWidth)
}

package main

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

var (
	reader *bufio.Reader = bufio.NewReader(os.Stdin)
	writer *bufio.Writer = bufio.NewWriter(os.Stdout)
)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
    defer writer.Flush()

    var n, mh int64
    scanf("%d %d\n", &n, &mh)
    heights := []int64{}
    for ; n > 0; n-- {
        var h int64
        scanf("%d", &h)
        heights = append(heights, h)
    }
    res := 0
    for _, h := range heights {
        if h <= mh {
            res += 1
        } else {
            res += 2
        }
    }
    printf("%d", res)
}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)

func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {

	var number, height, i int16
	_, _ = fmt.Scan(&number)
	_, _ = fmt.Scan(&height)

	var oned = make([]int16, number, number+4)

	for i = 0; i < number; i++ {
		scanf("%d", &oned[i])
	}

	var count int = 0
	for i = 0; i < number; i++ {
		for oned[i] > 0 {
			count++
			oned[i] = oned[i] - height
		}
	}
	fmt.Print(count)

}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)

func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {

	var number, height, i int16 = 0, 0, 0
	scanf("%d", number)
	scanf("%d", height)

	var oned = make([]int16, number, number+4)

	for i = 0; i < number; i++ {
		scanf("%d ", &oned[i])
	}

	var count int = 0
	for i = 0; i < number; i++ {
		for oned[i] > 0 {
			count++
			oned[i] = oned[i] - height
		}
	}
	fmt.Print(count)

}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)

func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {

	var number, height, i int16 = 0, 0, 0
	_, _ = fmt.Scan(&number)
	_, _ = fmt.Scan(&height)

	var oned = make([]int16, number, number+4)

	for i = 0; i < number; i++ {
		scanf("%d ", &oned[i])
	}

	var count int = 0
	for i = 0; i < number; i++ {
		for oned[i] > 0 {
			count++
			oned[i] = oned[i] - height
		}
	}
	fmt.Print(count)

}

package main

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

func main() {
	var n, h int
	var count = 0
	_, _ = fmt.Scan(&n, &h)
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	arr := strings.Fields(scanner.Text())
	array := make([]int, n, n)
	for num, element := range arr {
		el, _ := strconv.Atoi(element)
		array[num] = el
	}
	for _, num := range array {
		if num > h {
			count += 2
		} else {
			count++
		}
	}
	fmt.Println(count)
}

package main

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

func main() {
	var (
		n, h, h1 int
		str  string
		arr  []string

	)
	_, _ = fmt.Scan(&n, &h)
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	arr = strings.Fields(scanner.Text())
	iarr := make([]int, 0, n)
	for _, str = range arr {
		h1, _ = strconv.Atoi(str)
		iarr = append(iarr, h1)
	}
	for _, element := range iarr {
		if element > h {
			n++
		}
	}
	fmt.Println(n)
}

package main

import "fmt"

func main() {
	var (
		n            int
		heightOfWall int
	)
	fmt.Scanf("%d %d", &n, &heightOfWall)
	// fmt.Println(n, h)
	var heights []int
	for i := 0; i < n; i++ {
		var h int
		fmt.Scanf("%d", &h)
		heights = append(heights, h)
	}
	// fmt.Println(heights)
	var width int
	for _, h := range heights {
		width += 1
		if h > heightOfWall {
			width += 1
		}
	}
	fmt.Println(width)
}

package main

import "fmt"

func main() {
	var (
		n            int
		heightOfWall int
	)
	fmt.Scanf("%d %d", &n, &heightOfWall)

	var heights []int
	for i := 0; i < n; i++ {
		var h int
		fmt.Scanf("%d", &h)
		heights = append(heights, h)
	}

	var width int
	for _, h := range heights {
		if h <= heightOfWall {
			width += 1
		} else {
			width += 2
		}
	}
	fmt.Println(width)
}

package main

import "fmt"

func main() {
	var (
		n            int
		heightOfWall int
	)
	fmt.Scanf("%d %d", &n, &heightOfWall)
	// fmt.Println(n, h)
	var heights []int
	for i := 0; i < n; i++ {
		var h int
		fmt.Scanf("%d", &h)
		heights = append(heights, h)
	}
	// fmt.Println(heights)
	var width int
	for _, h := range heights {
		if h <= heightOfWall {
			width += 1
		} else {
			width += 2
		}
	}
	fmt.Println(width)
}

package main

import "fmt"

func main() {
	var (
		n            int
		heightOfWall int
	)
	fmt.Scanf("%d %d", &n, &heightOfWall)
	// fmt.Println(n, h)
	var heights []int
	for i := 0; i < n; i++ {
		var h int
		fmt.Scanf("%d", &h)
		heights = append(heights, h)
	}
	// fmt.Println(heights)
	var width int
	for _, h := range heights {
		if h <= heightOfWall {
			width += 1
		} else {
			width += 2
		}
	}
	fmt.Println(width+1)
}

// MIT License
//
// Copyright (c) 2017 Nobi Hoang <nobi.hoa@gmail.com>
//
// http://codeforces.com/problemset/problem/677/A
//

package main

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

// ReadLine reads a line from the command line.
// It returns the line and an error if that fails.
func ReadLine() (string, error) {
  line, err := bufio.NewReader(os.Stdin).ReadString('\n')
  if err != nil {
    return "", err
  }
  return strings.TrimSpace(string(line)), nil
}

// Execute run
func Execute() {
  var n, h int
  fmt.Scanf("%d %d\n", &n, &h)

  var a = make([]int, n)
  s, _ := ReadLine()
  for i, str := range strings.Split(s, " ") {
    num, _ := strconv.Atoi(str)
    a[i] = num
  }

  sum := 0
  for i := 0; i < n; i++ {
    if a[i] >= h  {
      sum += 2
    } else {
      sum++
    }
  }
  fmt.Println(sum)
}

func main() {
  Execute()
}

package main

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

func main() {
	var myStrings [2]string
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 2; i++ {
		scanner.Scan()
		myStrings[i] = scanner.Text()
	}

	initialization := strings.Split(myStrings[0], " ")
	listOfFriendsHeights := strings.Split(myStrings[1], " ")
	h, _ := strconv.Atoi(initialization[1])
	var roadWidth int
	//
	for _, friendHeight := range listOfFriendsHeights {
		friendHeight, _ := strconv.Atoi(friendHeight)
		if friendHeight > h {
			roadWidth++
		}
		roadWidth++
	}
	println(roadWidth)
}

package main

import "fmt"

func main() {
	var n, h int
	fmt.Scanf("%d %d", &n, &h)
	ret := 0

	for i := 0; i < n; i++ {
		var tmp = 0
		fmt.Scanf("%d", &tmp)
		if tmp > h {
			ret += 2
		} else {
			ret += 1
		}
	}

	fmt.Printf("%d\n", ret)
}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var p, fh, w int
	scanf("%d\n", &p)
	scanf("%d\n", &fh)
	fmt.Println(p)
	for i := 0; i < p; i++ {
		var height int
		scanf("%d\n", &height)
		if height > fh {
			w += 2
		} else {
			w++
		}
	}
	printf("%d\n", w)
}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var p, fh, w int
	scanf("%d %d\n", &p, &fh)
	for i := 0; i < p; i++ {
		var height int
		scanf("%d\n", &height)
		if height > fh {
			w += 2
		} else {
			w++
		}
	}
	printf("%d\n", w)
}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var a, b int
	scanf("%d %d\n", &a, &b)
	printf("%d\n", a+b)
}

package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var a, b int
	scanf("%d %d\n", &a, &b)
	printf("%d\n", a+b)
	printf("%d\n", a+b)
}

package main

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

func main() {
	fsc := NewFastScanner()
	N, K := fsc.NextInt(), fsc.NextInt()
	ans := 0
	for i := 0; i < N; i++ {
		var height int
		height = fsc.NextInt()
		if height > K {
			ans++
		}
	}
	fmt.Println(ans)
}

//template
type FastScanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewFastScanner() *FastScanner {
	rdr := bufio.NewReaderSize(os.Stdin, 2028)
	return &FastScanner{r: rdr}
}

func (s *FastScanner) next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}

func (s *FastScanner) NextInt() int {
	val, err := strconv.Atoi(s.next())
	if err != nil {
		panic(err)
	}
	return val
}
func (s *FastScanner) NextInt64() int64 {
	val, err := strconv.ParseInt(s.next(), 10, 64)
	if err != nil {
		panic(err)
	}
	return val
}
func (s *FastScanner) pre() {
	if s.p >= len(s.buf) {
		s.ReadLine()
		s.p = 0
	}
}

func (s *FastScanner) ReadLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, err := s.r.ReadLine()
		if err != nil {
			panic(err.Error())
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}

package main

import "fmt"

func main()  {
	var n, h, res int
	fmt.Scanf("%d %d", &n, &h)
	for i, tmp := 0, 0; i < n; i++ {
		fmt.Scanf("%d", &tmp)
		if tmp > h {
			res += 2
		} else {
			res++
		}
	}
	fmt.Println(res)

}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

func Solve(reader *bufio.Reader, writer *bufio.Writer) {
	var n, h int
	fmt.Fscan(reader, &n, &h)
	a := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Fscan(reader, &a[i])
	}
	sort.Ints(a)
	fmt.Fprintf(writer, "%v\n", eat(a, h, 2, 1))
}

func eat(a []int, h, g, b int) int {
	var i int
	for i = 0; i < len(a) && h > a[i]; i++ {
		h += a[i] / 2
	}
	if i == len(a) {
		return len(a)
	}
	ans, mx := i, 0
	if g > 0 {
		mx = max(eat(a[i:], h*2, g-1, b), mx)
	}
	if b > 0 {
		mx = max(eat(a[i:], h*3, g, b-1), mx)
	}
	return ans + mx
}

func abc(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func max(a, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}

func min(a, b int) int {
	if a < b {
		return a
	} else {
		return b
	}
}

func main() {
	var reader *bufio.Reader
	var writer *bufio.Writer

	filename_in := "data.in"
	filename_out := "data.out"

	stdinout := true
	readtests := true
	tests := 1

	if (!stdinout || inArgs("local")) && !inArgs("std") {
		infile, inerr := os.Open(filename_in)
		if inerr != nil {
			if os.IsNotExist(inerr) {
				os.Create(filename_in)
			}
			fmt.Println(inerr)
			return
		}
		defer infile.Close()

		outfile, outerr := os.OpenFile(filename_out, os.O_WRONLY, os.ModeAppend)
		if outerr != nil {
			if os.IsNotExist(outerr) {
				outfile, outerr = os.Create(filename_out)
				if outerr != nil {
					fmt.Println(outerr)
					return
				}
			}
		}
		defer outfile.Close()

		reader = bufio.NewReader(infile)
		writer = bufio.NewWriter(outfile)
	} else if stdinout || inArgs("std") {
		reader = bufio.NewReader(os.Stdin)
		writer = bufio.NewWriter(os.Stdout)
	}
	defer func() {
		err := writer.Flush()
		if err != nil {
			fmt.Println(err)
		}
	}()

	if readtests || inArgs("local") {
		fmt.Fscanf(reader, "%d\n", &tests)
	}

	for i := 0; i < tests; i++ {
		Solve(reader, writer)
		fmt.Fscanf(reader, "\n")
	}

}

func inArgs(arg string) bool {
	for _, a := range os.Args {
		if a == arg {
			return true
		}
	}
	return false
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

var (
	reader = bufio.NewReader(os.Stdin)
	writer = bufio.NewWriter(os.Stdout)
)

func main() {
	defer writer.Flush()

	var T int
	fmt.Fscan(reader, &T)

	perm := [3][]int{
		[]int{2, 2, 3},
		[]int{2, 3, 2},
		[]int{3, 2, 2},
	}

	for ; T > 0; T-- {
		var n int
		var h uint64
		fmt.Fscan(reader, &n, &h)

		a := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Fscan(reader, &a[i])
		}
		sort.Slice(a, func(i, j int) bool {
			return a[i] < a[j]
		})

		pref := make([]uint64, n)
		for i := 0; i < n; i++ {
			if i > 0 {
				pref[i] += pref[i-1]
			}
			pref[i] += uint64(a[i] >> 1)
		}

		try := func(c int) int {
			lo, hi := c, n-1
			pos := -1

			for lo <= hi {
				mid := (lo + hi) >> 1
				if uint64(a[mid]) < h {
					pos = mid
					lo = mid + 1
				} else {
					hi = mid - 1
				}
			}

			if pos != -1 {
				h += pref[pos]
				if c > 0 {
					h -= pref[c-1]
				}
			}

			return pos
		}

		ans := 0
		for _, strategy := range perm {
			cur := 0
			j := 0
			tmp := 0
			rollback := h
			for cur < n {
				pos := try(cur)
				if pos == -1 && j == 3 {
					break
				}
				if pos != -1 {
					tmp += pos - cur + 1
					cur = pos + 1
				} else {
					h *= uint64(strategy[j])
					j += 1
				}
			}

			if ans < tmp {
				ans = tmp
			}
			h = rollback
		}

		fmt.Fprintf(writer, "%d\n", ans)
	}
}

package main

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

var in = bufio.NewReader(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func readInt(delim byte) (int, error) {
	s, err := in.ReadString(delim)
	if err != nil {
		return 0, err
	}
	s = strings.TrimRight(s, " \r\n")
	n, err := strconv.Atoi(s)
	if err != nil {
		return 0, err
	}
	return n, nil
}

func calc(a []int, b []int, h int) int {
	n := len(a)
	j := 0
	for i := 0; i < n; i++ {
		for ; h <= a[i] && j < 3; j++ {
			h *= b[j]
		}
		if h <= a[i] {
			return i
		}
		h += a[i] / 2
	}
	return n

}

func main() {
	defer out.Flush()
	t, err := readInt('\n')
	if err != nil {
		out.WriteString(err.Error())
		return
	}
	for ; t > 0; t-- {
		n, err := readInt(' ')
		h, err := readInt('\n')
		a := make([]int, n)
		for i := 0; i < n; i++ {
			if i < n-1 {
				a[i], err = readInt(' ')

			} else {
				a[i], err = readInt('\n')
			}
			if err != nil {
				out.WriteString(err.Error())
				return
			}
		}
		sort.Ints(a)
		res := calc(a, []int{2, 2, 3}, h)
		res2 := calc(a, []int{2, 3, 2}, h)
		if res2 > res {
			res = res2
		}
		res2 = calc(a, []int{3, 2, 2}, h)
		if res2 > res {
			res = res2
		}
		out.WriteString(strconv.Itoa(res))
		out.WriteString("\n")
	}
}


package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

func main() {
	var input io.Reader = bufio.NewReader(os.Stdin)

	var t, n, m int

	var A [1005]int
	var B [1005]int

	fmt.Fscan(input, &t)

	for q := 0; q < t; q++ {

		fmt.Fscan(input, &n, &m)

		for i := 0; i < n; i++ {
			fmt.Fscan(input, &A[i])
		}

		for i := 0; i < m; i++ {
			fmt.Fscan(input, &B[i])
		}

		var ans int = 0
		for i := 0; i < n; i++ {
			for j := 0; j < m; j++ {
				if A[i] == B[j] {
					ans = A[i]
				}
			}
		}

		if ans > 0 {
			fmt.Println("YES")
			fmt.Println("1", ans)
		} else {
			fmt.Println("NO")
		}

	}
}

package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

func main() {
	io := newFastIO(os.Stdin, os.Stdout)
	defer io.Flush()

	for t := io.nextInt(); t > 0; t-- {
		n, m := io.nextInt(), io.nextInt()
		a := io.nextInts(n)
		b := io.nextInts(m)

		s := map[int]bool{}
		for _, x := range b {
			s[x] = true
		}
		ans := -1
		for _, x := range a {
			if _, ok := s[x]; ok {
				ans = x
			}
		}
		if ans != -1 {
			io.println("YES")
			io.printlnInts(1, ans)
		} else {
			io.println("NO")
		}
	}
}

type fastIO struct {
	*bufio.Reader
	*bufio.Writer
	p [1]byte
}

func newFastIO(r io.Reader, w io.Writer) *fastIO {
	return &fastIO{Reader: bufio.NewReader(r), Writer: bufio.NewWriter(w)}
}

func (f *fastIO) nextInt() int {
	f.Read(f.p[:])
	for !('0' <= f.p[0] && f.p[0] <= '9') {
		f.Read(f.p[:])
	}
	n := 0
	for '0' <= f.p[0] && f.p[0] <= '9' {
		n = n*10 + int(f.p[0]) - '0'
		f.Read(f.p[:])
	}
	return n
}

func (f *fastIO) nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = f.nextInt()
	}
	return a
}

func (f *fastIO) next() string {
	f.Read(f.p[:])
	for f.p[0] <= ' ' {
		f.Read(f.p[:])
	}
	var s []byte
	for f.p[0] > ' ' {
		s = append(s, f.p[0])
		f.Read(f.p[:])
	}
	return string(s)
}

func (f *fastIO) println(a ...interface{}) {
	fmt.Fprintln(f.Writer, a...)
}

func (f *fastIO) print(a ...interface{}) {
	fmt.Fprint(f.Writer, a...)
}

func (f *fastIO) printInts(a ...int) {
	if len(a) > 0 {
		f.print(a[0])
		for _, x := range a[1:] {
			f.print(" ", x)
		}
	}
}

func (f *fastIO) printlnInts(a ...int) {
	f.printInts(a...)
	f.println()
}

package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

func main() {
	io := newFastIO(os.Stdin, os.Stdout)
	defer io.Flush()

	for t := io.nextInt(); t > 0; t-- {
		n, m := io.nextInt(), io.nextInt()
		a := io.nextInts(n)
		b := io.nextInts(m)

		s := map[int]bool{}
		for _, x := range b {
			s[x] = true
		}
		ans := -1
		for _, x := range a {
			if s[x] {
				ans = x
			}
		}
		if ans != -1 {
			io.println("YES")
			io.printlnInts(1, ans)
		} else {
			io.println("NO")
		}
	}
}

type fastIO struct {
	*bufio.Reader
	*bufio.Writer
	p [1]byte
}

func newFastIO(r io.Reader, w io.Writer) *fastIO {
	return &fastIO{Reader: bufio.NewReader(r), Writer: bufio.NewWriter(w)}
}

func (f *fastIO) nextInt() int {
	f.Read(f.p[:])
	for !('0' <= f.p[0] && f.p[0] <= '9') {
		f.Read(f.p[:])
	}
	n := 0
	for '0' <= f.p[0] && f.p[0] <= '9' {
		n = n*10 + int(f.p[0]) - '0'
		f.Read(f.p[:])
	}
	return n
}

func (f *fastIO) nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = f.nextInt()
	}
	return a
}

func (f *fastIO) next() string {
	f.Read(f.p[:])
	for f.p[0] <= ' ' {
		f.Read(f.p[:])
	}
	var s []byte
	for f.p[0] > ' ' {
		s = append(s, f.p[0])
		f.Read(f.p[:])
	}
	return string(s)
}

func (f *fastIO) println(a ...interface{}) {
	fmt.Fprintln(f.Writer, a...)
}

func (f *fastIO) print(a ...interface{}) {
	fmt.Fprint(f.Writer, a...)
}

func (f *fastIO) printInts(a ...int) {
	if len(a) > 0 {
		f.print(a[0])
		for _, x := range a[1:] {
			f.print(" ", x)
		}
	}
}

func (f *fastIO) printlnInts(a ...int) {
	f.printInts(a...)
	f.println()
}

package main

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

func main() {
	var cases int
	fmt.Scanf("%d\n", &cases)
	reader := bufio.NewReader(os.Stdin)
	for i := 0; i < cases; i++ {
		readLine(reader)
		s := readLine(reader)
		ai := strings.Split(string(s), " ")
		m := make(map[int]struct{})
		for i:=0;i<len(ai);i++ {
			c, _ := strconv.Atoi(ai[i])
			m[c] = struct{}{}
		}
		s = readLine(reader)
		bi := strings.Split(string(s), " ")
		flag := false
		number := 0
		for i:=0; i < len(bi); i++ {
			c,_ := strconv.Atoi(bi[i])
			if _, ok := m[c]; ok {
				flag = true
				number = c
				break
			}
		}
		if flag {
			fmt.Println("YES")
			fmt.Println(1, number)
		} else {
			fmt.Println("NO")
		}
	}
}

func readLine(reader *bufio.Reader) []byte {
	result := make([]byte, 0)
	for {
		s, isPrefix, err := reader.ReadLine()
		if err != nil {
			fmt.Printf("error=%+v\n", err)
			break
		}
		result = append(result, s...)
		if !isPrefix {
			break
		}
	}
	return result
}

package main

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

func main() {
	var t int
	fmt.Scan(&t)

	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)

	var n, m int
Loop:
	for i := 0; i < t; i++ {
		scanner.Scan()
		n = toInt(scanner.Bytes())

		scanner.Scan()
		m = toInt(scanner.Bytes())

		a := make(map[int]int)
		b := make(map[int]int)

		for j := 0; j < n; j++ {
			scanner.Scan()
			in := toInt(scanner.Bytes())
			if _, ok := a[in]; !ok {
				a[in] = 1
			}
		}

		for k := 0; k < m; k++ {
			scanner.Scan()
			in := toInt(scanner.Bytes())
			if _, ok := b[in]; !ok {
				b[in] = 1
			}
		}

		if n < m {
			for v, _ := range a {
				if _, ok := b[v]; ok {
					fmt.Printf("YES\n%d %d\n", 1, v)
					continue Loop
				}
			}
			fmt.Println("NO")
		} else {
			for v, _ := range b {
				if _, ok := a[v]; ok {
					fmt.Printf("YES\n%d %d\n", 1, v)
					continue Loop
				}
			}
			fmt.Println("NO")
		}

	}
}

func toInt(buf []byte) (n int) {
	for _, v := range buf {
		n = n*10 + int(v-'0')
	}
	return
}

package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

func main() {
	var input io.Reader = bufio.NewReader(os.Stdin)

	var t, n, m int

	fmt.Fscan(input, &t)

	for q := 0; q < t; q++ {

		fmt.Fscan(input, &n, &m)

		var A [1005]int
		var B [1005]int

		for i := 0; i < n; i++ {
			fmt.Fscan(input, &A[i])
		}

		for i := 0; i < m; i++ {
			fmt.Fscan(input, &B[i])
		}

		var ans int = 0
		for i := 0; i < n; i++ {
			for j := 0; j < m; j++ {
				if A[i] == B[j] {
					ans = A[i]
				}
			}
		}

		if ans > 0 {
			fmt.Println("YES")
			fmt.Println("1", ans)
		} else {
			fmt.Println("NO")
		}

	}
}

// https://codeforces.com/contest/1374/problem/A
package main

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

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func min2(a, b int) int {
	if a > b {
		return b
	}
	return a
}

func min3(a, b, c int) int {
	return min2(a, min2(b, c))
}

func main() {
	defer writer.Flush()

	var t int
	scanf("%d\n", &t)

	for k := 0; k < t; k++ {
		// Read input
		var n, m int
		scanf("%d %d\n", &n, &m)

		a := make([]int, n)
		for i := 0; i < n; i++ {
			scanf("%d", &a[i])
		}
		scanf("\n")
		b := make([]int, m)
		for i := 0; i < m; i++ {
			scanf("%d", &b[i])
		}
		scanf("\n")

		var same int
		var has bool

		has = false

		for i := 0; i < n; i++ {
			for j := 0; j < m; j++ {
				if a[i] == b[j] {
					has = true
					same = a[i]
					break
				}
			}
		}

		if has {
			printf("YES\n")
			printf("1 %d\n", same)
		} else {
			printf("NO\n")
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	SCANNER_BUF_SIZE = 2 << 20

	INF = int64(math.MaxInt64)
	MOD = 1e9 + 7
)

var (
	writer  *bufio.Writer
	scanner *bufio.Scanner
)

func init() {
	writer = bufio.NewWriter(os.Stdout)
	scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, SCANNER_BUF_SIZE), SCANNER_BUF_SIZE)
}

func printf(f string, a ...interface{}) {
	fmt.Fprintf(writer, f, a...)
}

func sint64() int64 {
	scanner.Scan()
	bb := scanner.Bytes()
	i := int64(0)
	if bb[0] == '-' {
		for _, b := range bb[1:] {
			i *= 10
			i -= int64(b - '0')
		}
		return i
	}
	for _, b := range bb {
		i *= 10
		i += int64(b - '0')
	}
	return i
}

func suint64() uint64 {
	scanner.Scan()
	bb := scanner.Bytes()
	i := uint64(0)
	for _, b := range bb {
		i *= 10
		i += uint64(b - '0')
	}
	return i
}

func sstring() string {
	scanner.Scan()
	return scanner.Text()
}

func gcd(a, b int64) int64 {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

func lcm(a, b int64) int64 {
	return a * b / gcd(a, b)
}

func abs(a int64) int64 {
	if a < 0 {
		return a * -1
	}
	return a
}

func min(a int64, rest ...int64) int64 {
	for _, r := range rest {
		if r < a {
			a = r
		}
	}
	return a
}

func max(a int64, rest ...int64) int64 {
	for _, r := range rest {
		if r > a {
			a = r
		}
	}
	return a
}

func main() {
	defer writer.Flush()
	t := sint64()
	for ; t > 0; t-- {
		n := sint64()
		m := sint64()
		a := map[int64]bool{}
		for i := int64(0); i < n; i++ {
			a[sint64()] = true
		}
		b := map[int64]bool{}
		for i := int64(0); i < m; i++ {
			b[sint64()] = true
		}
		res := int64(0)
		for i := range a {
			if b[i] {
				res = i
				break
			}
		}
		if res == 0 {
			printf("NO\n")
		} else {
			printf("YES\n")
			printf("1 %d\n", res)
		}
	}
}

package main

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

func main() {
	var t, n, m, a int
	in := bufio.NewReader(os.Stdin)

	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &n, &m)
		data := make(map[int]bool, 0)
		for i := 0; i < n; i++ {
			fmt.Fscan(in, &a)
			data[a] = true
		}
		hasAns := false
		ans := -1
		for i := 0; i < m; i++ {
			fmt.Fscan(in, &a)
			if data[a] {
				hasAns = true
				ans = a
			}
		}
		if hasAns {
			fmt.Println("YES")
			fmt.Println(1, ans)
		} else {
			fmt.Println("NO")
		}
	}
}