package main

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

func main()  {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var n int
	var x int
//	a := make([]int,0)
	fmt.Fscanln(in,&n)
	ps := 0
	mn := 0
	for i := 0 ;i  < n ;i++{
		fmt.Fscan(in,&x)
		if(x >= 1){
			ps ++
		}else{
				if(x <= -1){
					mn ++
				}
		}
	}
	if(ps > mn){
		if(ps >= (n + 1) / 2){
			fmt.Fprint(out,1)
		}else{
			fmt.Fprint(out,0)
		}
		return
	}else{
		if mn >= (n + 1) / 2{
			fmt.Fprint(out,-1)
		}else{
			fmt.Fprint(out,0)
		}
		return
	}

}
func min1(x1,x2 int) int  {
	if(x1 < x2){
		return x1
	}else{
		return x2
	}
}

package main

import (
	"bufio"
	"os"
	"fmt"
)
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 readLine()(string,error) 			{ return reader.ReadString('\n') }

func main() {
	defer writer.Flush()
	var n int
	scanf("%d\n", &n)
	k := n/2 + n%2
	a := make([]int,n)
	for i := 0; i < n; i++ {
		scanf("%d", &a[i])
	}
	for i := -1000; i <= 1000; i++ {
			x := 0
			for _, j := range a {
				if ((i > 0 && j > 0) || (i < 0 && j < 0)) {
					x++
				}
			}
			if x >= k {
				fmt.Println(i)
				return
			}

	}
	fmt.Println(0)
}

package main

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

func getNumFromOneLine(ir *bufio.Reader) int {
	stream, _ := ir.ReadString('\n')
	// Trims the stream and then splits
	trimmedStream := strings.TrimSpace(stream)
	num, _ := strconv.Atoi(trimmedStream)
	return num
}

func getNumsFromOneLine(ir *bufio.Reader) []int {
	stream, _ := ir.ReadString('\n')
	// Trims the stream and then splits
	trimmedStream := strings.TrimSpace(stream)
	splitArr := strings.Split(trimmedStream, " ")
	// convert strings to integers and store them in a slice
	nums := make([]int, len(splitArr))
	for index, val := range splitArr {
		nums[index], _ = strconv.Atoi(val)
	}
	return nums
}

func main() {
	ir := bufio.NewReader(os.Stdin)
	_ = getNumFromOneLine(ir)
	nums := getNumsFromOneLine(ir)

	pos, neg := 0, 0
	for _, num := range nums {
		if num > 0 {
			pos += 1
		} else if num < 0 {
			neg += 1
		}
	}

	if neg >= (len(nums)+1)/2 {
		fmt.Println(-1)
	} else if pos >= (len(nums)+1)/2 {
		fmt.Println(1)
	} else {
		fmt.Println(0)
	}
}

package main

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

func cleanString(stream string, seperator string) []int{
	// Trims the stream and then splits
	trimmedStream := strings.TrimSpace(stream)
	splitArr := strings.Split(trimmedStream, seperator)
	// convert strings to integers and store them in a slice
	nums := make([]int, len(splitArr))
	for index,val := range splitArr{
		nums[index], _ = strconv.Atoi(val)
	}
	return nums
}

func main() {
	ir := bufio.NewReader(os.Stdin)
	input, _ := ir.ReadString('\n')
	_, _ = strconv.Atoi(strings.TrimSpace(input))
	var nums []int
	lineInput, _ := ir.ReadString('\n')
	nums = cleanString(lineInput, " ")
	pos, neg := 0, 0
	for _, num := range nums {
		if num > 0 {
			pos += 1
		} else if num < 0 {
			neg += 1
		}
	}
	if neg >= (len(nums) + 1) / 2 {
		fmt.Println(-1)
	} else if pos >= (len(nums) + 1) / 2 {
		fmt.Println(1)
	} else {
		fmt.Println(0)
	}
}

package main

import (
 "fmt"
)

func main() {
    var n int = 0;
    fmt.Scan(&n);
    var plus, minus, zero int = 0,0,0;
    for n > 0 {
        var x int = 0;
        fmt.Scan(&x);
        if (x < 0) {
            minus++;
        } else if (x > 0) {
            plus++;
        } else {
            zero++;
        }
        n--;
    }
    if (plus >= minus + zero) {
        fmt.Println(1);
    } else if (minus >= plus + zero) {
        fmt.Println(-1);
    } else {
        fmt.Println(0);
    }
}

package main

import (
    "fmt"
)

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

    pos := 0
    neg := 0
    for i := 0; i <= n; i++ {
        var nmb int
        fmt.Scanf("%d", &nmb)
        if nmb > 0 {
            pos++
        }
        if nmb < 0 {
            neg++
        }
    }

    if neg < (n + 1) / 2 && pos < (n + 1) / 2 {
        fmt.Println(0)
    } else if neg >= (n + 1) / 2 {
        fmt.Println(-1)
    } else if pos >= (n + 1) / 2 {
        fmt.Println(1)
    }

}

package main

import (
	"fmt"
)

func calc(n,z,p,t int) int{
	var val int
	if t&1==1{
		val = t/2 + 1
	}else{
		val = t/2
	}

	if n >=val{
		return -1
	}else if p>=val{
		return 1
	}
	return 0
}

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

	for i:=0;i<t;i++{
		var temp int
		fmt.Scan(&temp)
		if temp==0{
			zero++
		}else if temp<0{
			neg++
		}else{
			pos++
		}
	}
	fmt.Print(calc(neg,zero,pos,t))
}

package main

import "fmt"

func main() {

	var n, tmp, neg, zer, pos int

	fmt.Scan(&n)

	for i := 0 ; i < n ; i++ {
		fmt.Scan(&tmp)

		switch {
		case tmp < 0:
			neg++
		case tmp == 0:
			zer++
		case tmp > 0:
			pos++
		}
	}

	if pos >= (n+1)/2 {
		fmt.Println(1)
	} else if neg >= (n+1)/2 {
		fmt.Println(-1)
	} else {
		fmt.Println(0)
	}
}

package main

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

type Seg struct {

}

type Prob struct {
    in *bufio.Reader
}

func (prob *Prob) NextLine() string {
    line, _, _ := prob.in.ReadLine()
    return string(line[:])
}

func (prob *Prob) NextByte() byte {
    bt, _ := prob.in.ReadByte()
    return bt
}

func (prob *Prob) Next() string {
    var buff bytes.Buffer
    bt := prob.NextByte()
    for bt == '\n' || bt == ' ' {
        bt = prob.NextByte()
    }
    for bt != '\n' && bt != ' ' {
        buff.WriteByte(bt)
        bt = prob.NextByte()
    }
    return buff.String()
}

func (prob *Prob) NextInt() int {
    var x int
    bt := prob.NextByte()
    for bt > '9' || bt < '0' {
        if bt == '-' {
            return -prob.NextInt()
        }
        bt = prob.NextByte()
    }
    for bt >= '0' && bt <= '9' {
        x = x * 10 + int(bt - '0')
        bt = prob.NextByte()
    }
    return x
}

func (prob Prob) Solve() {
    n := prob.NextInt()
    po := 0
    ne := 0
    for i := 0; i < n; i++ {
        d := prob.NextInt()
        if d > 0 {
            po++
        } else if d < 0 {
            ne++
        }
    }
    if po >= (n + 1) / 2 {
        fmt.Println("1")
    } else if ne >= (n + 1) / 2 {
        fmt.Println("-1")
    } else {
        fmt.Println(0)
    }
}

func main() {
    Prob{in: bufio.NewReader(os.Stdin)}.Solve()
}

package main

import "fmt"

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

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n := 0
	fmt.Fscanf(in, "%d\n", &n)
	a := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Fscanf(in, "%d", &a[i])
	}
	fmt.Fscanf(in, "\n")
	need := n/2 + n%2
	for j := -1000; j <= 1000; j++ {
		if j != 0 {
			cur := float64(0)
			for i := 0; i < n; i++ {
				if float64(a[i])/float64(j) > 0 {
					cur += 1
				}
			}
			if cur >= float64(need) {
				fmt.Fprintf(out, "%d\n", j)
				return
			}
		}
	}
	fmt.Fprintf(out, "%d\n", 0)
	return
}

func recover(s string) string {
	if len(s) == 1 {
		return s
	}
	if len(s)%2 == 0 {
		return recover(s[:len(s)-1]) + string(s[len(s)-1])
	} else {
		return recover(s[1:]) + string(s[0])
	}
}

package main

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

// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

func IsNewLine(c byte) bool {
	switch c {
	case '\n', '\r':
		return true
	}
	return false
}

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

// -----------------------------------------------------------------------------

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Simple math functions

const (
	// big prime
	INF  = 1000000007
	INF2 = 1000000009
	INF3 = 998244353
)

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

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

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

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

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

func absll(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}

func main() {
	defer Flush()

	n := readi()
	a := make([]int, n)
	for i := range a {
		a[i] = readi()
	}
	var pos, neg, zero int
	for _, v := range a {
		if v == 0 {
			zero++
		} else if v < 0 {
			neg++
		} else {
			pos++
		}
	}
	m := n / 2
	if n%2 != 0 {
		m++
	}
	if m <= pos {
		println(1)
	} else if m <= neg {
		println(-1)
	} else {
		println(0)
	}
}

package main

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

func main() {
	rbuf := bufio.NewReader(os.Stdin)
	var n int
	fmt.Fscanf(rbuf, "%d\n", &n)

	var a []int = make([]int, n)
	pos, neg := 0, 0
	for i := range a {
		fmt.Fscanf(rbuf, "%d", &a[i])
		if (a[i] > 0) {
			pos += 1
		}
		if (a[i] < 0) {
			neg += 1
		}
	}

	if pos * 2 >= n {
		fmt.Println(1)
	} else if neg * 2 >= n {
		fmt.Println(-1)
	} else {
		fmt.Println(0)
	}
}

// http://codeforces.com/problemset/problem/1130/A
package main

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

func main() {
	var inputs int
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	inputs, _ = strconv.Atoi(scanner.Text())
	scanner.Scan()
	line := scanner.Text()
	var zeros int = 0
	var positives int = 0
	var negatives int = 0
	for _, num := range strings.Split(line, " ") {
		if num == "0" {
			zeros++
		} else if strings.Count(num, "-") == 1 {
			negatives++
		} else {
			positives++
		}
	}
	c := math.Ceil(float64(inputs)/2)
	if float64(positives) >= c {
		fmt.Printf("1")
	} else if float64(negatives) >= c {
		fmt.Printf("-1")
	} else {
		fmt.Printf("0")
	}
}

package main

import (
	`fmt`
)

func main() {
	var n int
	fmt.Scan(&n)
	pos := 0
	neg := 0
	for i := 0; i < n; i++ {
		x := 0
		fmt.Scan(&x)
		if x > 0 {
			pos += 1
		}
		if x < 0 {
			neg += 1
		}
	}
	if float64(neg) >= float64(n) / 2 {
		fmt.Println(-1)
	} else if float64(pos) >= float64(n) / 2. {
		fmt.Println(1)
	} else {
		fmt.Println(0)
	}
}

package main

import (
 "fmt"
)

func main() {
    var n int = 0;
    fmt.Scan(&n);
    var plus, minus, zero int = 0,0,0;
    for n > 0 {
        var x int = 0;
        fmt.Scan(&x);
        if (x < 0) {
            minus++;
        } else if (x > 0) {
            plus++;
        } else {
            zero++;
        }
        n--;
    }
    if (plus > minus + zero) {
        fmt.Println(1);
    } else if (minus > plus + zero) {
        fmt.Println(-1);
    } else {
        fmt.Println(0);
    }
}

package main

import "fmt"

func main() {

	var n, tmp, neg, zer, pos int

	fmt.Scan(&n)

	for i := 0 ; i < n ; i++ {
		fmt.Scan(&tmp)

		switch {
		case tmp < 0:
			neg++
		case tmp == 0:
			zer++
		case tmp > 0:
			pos++
		}
	}

	if pos >= n/2 {
		fmt.Println(1)
	} else if neg >= n/2 {
		fmt.Println(-1)
	} else {
		fmt.Println(0)
	}
}

package main

import (
    "fmt"
)

func solve() {
    var n int
    fmt.Scanf("%d", &n)
    po := 0
    ne := 0
    for i := 0; i < n; i++ {
        var d int
        fmt.Scanf("%d", &d)
        if d > 0 {
            po++
        } else if d < 0 {
            ne++
        }
    }
    if po >= (n + 1) / 2 {
        fmt.Println("1")
    } else if ne >= (n + 1) / 2 {
        fmt.Println("-1")
    } else {
        fmt.Println(0)
    }
}

func main() {
    solve()
}

package main

import (
    "fmt"
)

func solve() {
    var n int
    fmt.Scanf("%d", &n)
    po := 0
    ne := 0
    for i := 0; i < n; i++ {
        var d int
        fmt.Scanf("%d", &d)
        if d > 0 {
            po++
        } else if d < 0 {
            ne++
        }
    }
    fmt.Printf("%d %d %d\n", po, ne, (n + 1) / 2)
    if po >= (n + 1) / 2 {
        fmt.Println("1")
    } else if ne >= (n + 1) / 2 {
        fmt.Println("-1")
    } else {
        fmt.Println(0)
    }
}

func main() {
    solve()
}

package main

import (
    "fmt"
)

func solve() {
    var n int
    fmt.Scanf("%d", &n)
    po := 0
    ne := 0
    for i := 0; i < n; i++ {
        var d int
        fmt.Scanf("%d", &d)
        fmt.Printf("%d\n", d)
        if d > 0 {
            po++
        } else if d < 0 {
            ne++
        }
    }
    fmt.Printf("%d %d %d\n", po, ne, (n + 1) / 2)
    if po >= (n + 1) / 2 {
        fmt.Println("1")
    } else if ne >= (n + 1) / 2 {
        fmt.Println("-1")
    } else {
        fmt.Println(0)
    }
}

func main() {
    solve()
}

package main

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

func main()  {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var n int
	var x int
	a := make([]int,0)
	fmt.Fscanln(in,&n)
	ps := 0
	for i := 0 ;i  < n ;i++{
		fmt.Fscan(in,&x)
		a = append(a,x)
		if(x >= 1){
			ps ++
		}
	}
	if(ps >= (n + 1) / 2){
		fmt.Fprint(out,1)
	}else{
		fmt.Fprint(out,0)
	}

}
func min1(x1,x2 int) int  {
	if(x1 < x2){
		return x1
	}else{
		return x2
	}
}

package main

import "fmt"

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

package main

import "fmt"

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

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n := 0
	fmt.Fscanf(in, "%d %d\n", &n)
	a := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Fscanf(in, "%d\n", &a[i])
	}
	need := n/2 + n%2
	for j := -1000; j <= 1000; j++ {
		if j != 0 {
			cur := float64(0)
			for i := 0; i < n; i++ {
				if float64(a[i])/float64(j) > 0 {
					cur += float64(a[i]) / float64(j)
				}
			}
			if cur >= float64(need) {
				fmt.Fprintf(out, "%d\n", j)
				return
			}
		}
	}
	fmt.Fprintf(out, "%d\n", 0)
	return
}

func recover(s string) string {
	if len(s) == 1 {
		return s
	}
	if len(s)%2 == 0 {
		return recover(s[:len(s)-1]) + string(s[len(s)-1])
	} else {
		return recover(s[1:]) + string(s[0])
	}
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n := 0
	fmt.Fscanf(in, "%d\n", &n)
	a := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Fscanf(in, "%d", &a[i])
	}
	fmt.Fscanf(in, "\n")
	need := n/2 + n%2
	for j := -1000; j <= 1000; j++ {
		if j != 0 {
			cur := float64(0)
			for i := 0; i < n; i++ {
				if float64(a[i])/float64(j) > 0 {
					cur += float64(a[i]) / float64(j)
				}
			}
			if cur >= float64(need) {
				fmt.Fprintf(out, "%d\n", j)
				return
			}
		}
	}
	fmt.Fprintf(out, "%d\n", 0)
	return
}

func recover(s string) string {
	if len(s) == 1 {
		return s
	}
	if len(s)%2 == 0 {
		return recover(s[:len(s)-1]) + string(s[len(s)-1])
	} else {
		return recover(s[1:]) + string(s[0])
	}
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n := 0
	fmt.Fscanf(in, "%d\n", &n)
	a := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Fscanf(in, "%d\n", &a[i])
	}
	need := n/2 + n%2
	for j := -1000; j <= 1000; j++ {
		if j != 0 {
			cur := float64(0)
			for i := 0; i < n; i++ {
				if float64(a[i])/float64(j) > 0 {
					cur += float64(a[i]) / float64(j)
				}
			}
			if cur >= float64(need) {
				fmt.Fprintf(out, "%d\n", j)
				return
			}
		}
	}
	fmt.Fprintf(out, "%d\n", 0)
	return
}

func recover(s string) string {
	if len(s) == 1 {
		return s
	}
	if len(s)%2 == 0 {
		return recover(s[:len(s)-1]) + string(s[len(s)-1])
	} else {
		return recover(s[1:]) + string(s[0])
	}
}

package main

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

// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

func IsNewLine(c byte) bool {
	switch c {
	case '\n', '\r':
		return true
	}
	return false
}

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

// -----------------------------------------------------------------------------

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Simple math functions

const (
	// big prime
	INF  = 1000000007
	INF2 = 1000000009
	INF3 = 998244353
)

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

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

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

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

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

func absll(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}

func main() {
	defer Flush()

	n := readi()
	a := make([]int, n)
	for i := range a {
		a[i] = readi()
	}
	var pos, neg, zero int
	for _, v := range a {
		if v == 0 {
			zero++
		} else if v < 0 {
			neg++
		} else {
			pos++
		}
	}
	m := n / 2
	if n%2 != 0 {
		m++
	}
	if m <= zero {
		println(0)
	} else if m <= pos {
		println(1)
	} else if m <= neg {
		println(-1)
	} else {
		println(0)
	}
}

package main

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

// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

func IsNewLine(c byte) bool {
	switch c {
	case '\n', '\r':
		return true
	}
	return false
}

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

// -----------------------------------------------------------------------------

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Simple math functions

const (
	// big prime
	INF  = 1000000007
	INF2 = 1000000009
	INF3 = 998244353
)

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

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

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

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

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

func absll(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}

func main() {
	defer Flush()

	n := readi()
	a := make([]int, n)
	for i := range a {
		a[i] = readi()
	}
	var pos, neg, zero int
	for _, v := range a {
		if v == 0 {
			zero++
		} else if v < 0 {
			neg++
		} else {
			pos++
		}
	}
	m := n / 2
	if n%2 != 0 {
		m++
	}
	if m <= zero {
		println(0)
	} else if m <= pos {
		println(1)
	} else {
		println(-1)
	}
}

// http://codeforces.com/problemset/problem/1130/A
package main

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

func main() {
	var inputs int
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	inputs, _ = strconv.Atoi(scanner.Text())
	scanner.Scan()
	line := scanner.Text()
	var zeros int = 0
	var positives int = 0
	var negatives int = 0
	for _, num := range strings.Split(line, " ") {
		if num == "0" {
			zeros++
		} else if strings.Count(num, "-") == 1 {
			negatives++
		} else {
			positives++
		}
	}
	c := math.Ceil(float64(inputs)/2)
	if float64(zeros) >= c {
		fmt.Printf("0")
	} else if float64(negatives) >= c {
		fmt.Printf("-1")
	} else {
		fmt.Printf("1")
	}
}

// http://codeforces.com/problemset/problem/1130/A
package main

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

func main() {
	var inputs int
	fmt.Scanf("%d\n", &inputs)
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	line := scanner.Text()
	var zeros int = 0
	var positives int = 0
	var negatives int = 0
	for _, num := range strings.Split(line, " ") {
		if num == "0" {
			zeros++
		} else if strings.Count(num, "-") == 1 {
			negatives++
		} else {
			positives++
		}
	}
	if zeros >= inputs {
		fmt.Printf("0")
	} else if negatives >= inputs {
		fmt.Printf("-1")
	} else {
		fmt.Printf("1")
	}
}

package main

import (
	`bufio`
	`fmt`
	`os`
)

func main() {
	buf := bufio.NewReader(os.Stdin)
	var n int
	fmt.Fscanf(buf, "%d", &n)
	pos := 0
	neg := 0
	for i := 0; i < n; i++ {
		x := 0
		fmt.Fscanf(buf, "%d", &x)
		if x > 0 {
			pos += 1
		}
		if x < 0 {
			neg += 1
		}
	}
	if neg >= n / 2 {
		fmt.Println(-1)
	} else if pos >= n / 2 {
		fmt.Println(1)
	} else {
		fmt.Println(0)
	}
}

package main

import (
	"bufio"
	"os"
	"fmt"
)
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 readLine()(string,error) 			{ return reader.ReadString('\n') }

func main() {
	defer writer.Flush()
	var n int
	scanf("%d\n", &n)
	k := n/2 + n%2
	a := make([]int,n)
	for i := 0; i < n; i++ {
		scanf("%d", &a[i])
	}
	for i := -1000; i <= 1000; i++ {
		if (i != 0){
			x := 0
			for _, j := range a {
				if (((i > 0 && j > 0) || (i < 0 && j < 0)) && j%i != 0) {
					x++
				}
			}
			if x == k {
				fmt.Println(i)
				return
			}
		}
	}
	fmt.Println(0)
}

package main

import (
    "fmt"
)

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

    pos := 0
    neg := 0
    for i := 0; i < n; i++ {
        var nmb int
        fmt.Scanf("%d", &nmb)
        if nmb > 0 {
            pos++
        }
        if nmb < 0 {
            neg++
        }
    }

    if neg < (n + 1) / 2 && pos < (n + 1) / 2 {
        fmt.Println(0)
    } else if neg >= (n + 1) / 2 {
        fmt.Println(-1)
    } else if pos >= (n + 1) / 2 {
        fmt.Println(1)
    }

}


package main

import "fmt"

func main() {
	var d [3]int
	fmt.Scan(&d[0], &d[1], &d[2])

	id := 0
	sum := d[0]
	for i := 1; i < 3; i++ {
		if d[id] < d[i] {
			id = i
		}
		sum += d[i]
	}

	l := 0
	if 2*d[id] > sum {
		l = 2 * (sum - d[id])
	} else {
		l = sum
	}

	fmt.Println(l)
}

package main

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

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

type MySlice [][2]int

func (slice MySlice) Len() int           { return len(slice) }
func (slice MySlice) Less(i, j int) bool { return slice[i][1] < slice[j][1] }
func (slice MySlice) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

func main() {
	ini()
	defer writer.Flush()

	d1 := scanInt()
	d2 := scanInt()
	d3 := scanInt()

	result := min(d1 + d2 + d3, min(2 * (d1 + d2), min(2 * (d2 + d3), 2 * (d1 + d3))))
	writer.WriteString(strconv.Itoa(result))

	return
}

func binSearch(a []int, key int) int {
	l := -1
	r := len(a)
	for l < r-1 {
		m := (l + r) / 2
		if a[m] < key {
			l = m
		} else {
			r = m
		}
	}

	if a[r] != key {
		return -1
	}

	return r
}

func ini() {
	scanner = bufio.NewScanner(os.Stdin)
	writer = bufio.NewWriter(os.Stdout)
	scanner.Split(bufio.ScanWords)
}

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

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

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

package main

import "fmt"

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

func main() {
	var d1, d2, d3 int
	fmt.Scanf("%d %d %d", &d1, &d2, &d3)

	ret := min(d1 + min(d1 + 2 * d2, d3 + min(d2, d3 + d1)),
			   d2 + min(d2 + 2 * d1, d3 + min(d1, d3 + d2)))
	fmt.Printf("%d", ret)
}

package main

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

func main() {
	var d1, d2, d3 int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &d1, &d2, &d3)
	d1, d2, d3 = sorta(d1, d2, d3)
	if d1+d2 < d3 {
		fmt.Println((d1 + d2) * 2)
	} else {
		fmt.Println(d1 + d2 + d3)
	}
}

func sorta(a, b, c int) (int, int, int) {
	aa := make([]int, 0)
	aa = append(aa, a)
	aa = append(aa, b)
	aa = append(aa, c)
	sort.Slice(aa, func(i, j int) bool {
		return aa[i] < aa[j]
	})
	return aa[0], aa[1], aa[2]
}

package main

import (
	"fmt"
	"sort"
)

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

func main() {
	d := []int{0, 0, 0}
	fmt.Scanf("%d %d %d \n", &d[0], &d[1], &d[2])
	sort.Ints(d)
	r := d[0] + d[1] + min(d[2], d[0]+d[1])
	fmt.Print(r)
}

package main

import "fmt"

func min(a ...int) int {
    r := a[0]
    for _, v := range a {
        if r > v {
            r = v
        }
    }
    return r
}

func main() {
    // 总共4种情况，求个min就行了。
    var d1, d2, d3 int
    fmt.Scanf("%d %d %d", &d1, &d2, &d3);
    result := min(d1+d2+d3, 2*(d1+d2), 2*(d1+d3), 2*(d2+d3))
    fmt.Println(result)
}

package main

import (
	"fmt"
	"log"
)

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

func main() {
	var d1, d2, d3 int
	_, err := fmt.Scanf("%d %d %d", &d1, &d2, &d3)
	if err != nil {
		log.Fatal(err)
	}
	if d1+d3 < d2 {
		fmt.Println(2 * (d1 + d3))
		return
	} else if d2+d3 < d1 {
		fmt.Println(2 * (d2 + d3))
		return
	}
	fmt.Println(min(2*d1+2*d2, d1+d2+d3))
}

package main

import (
	"fmt"
)

func main() {
	var d1, d2, d3 int
	fmt.Scanf("%d %d %d", &d1, &d2, &d3)

	dis := []int{
		d1 + d2 + d3,
		2*d1 + 2*d2,
		2*d1 + 2*d3,
		2*d2 + 2*d3,
	}

	ans := int(2e9)
	for _, d := range dis {
		if ans > d {
			ans = d
		}
	}

	fmt.Println(ans)
}

package main

import "fmt"

func main(){
	var d1, d2, d3 int
	fmt.Scanf("%d%d%d", &d1, &d2, &d3)
	s := d1+d2+d3
	t := 2*(d1+d3)
	if s > t{
		s = t
	}
	t = 2*(d2+d3)
	if s > t{
		s = t
	}
	t = 2*(d1+d2)
	if s > t{
		s = t
	}
	fmt.Printf("%d\n", s)
}

package main;

import (
    "fmt"
)

func main() {
    var a, b, c int
    fmt.Scanf("%d%d%d", &a, &b, &c)
    dis := []int{
        a + b + c,
        2 * a + 2 * b,
        2 * a + 2 * c,
        2 * b + 2 * c,
    }

    ans := 0x3f3f3f3f
    for _, value := range dis {
        if value < ans {
            ans = value
        }
    }
    fmt.Println(ans)
}

package main

import (
    "fmt"
    )

func min(x, y uint) uint {
    if x < y {
        return x
    }
    return y
}

func main() {
    var d1, d2, d3 uint
    fmt.Scan(&d1, &d2, &d3)

    dis1 := d1 + d2 + d3
    dis2 := 2*d1 + 2*d2
    dist := min(dis1, dis2)
    dis3 := 2*d2 + 2*d3
    dist = min(dist, dis3)
    dis4 := 2*d1 + 2*d3
    dist = min(dist, dis4)

    fmt.Println(dist)
}

package main

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

func main() {
	var d1, d2, d3 int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &d1, &d2, &d3)
	if d1+d2 < d3 {
		fmt.Println((d1 + d2) * 2)
	} else {
		fmt.Println(d1 + d2 + d3)
	}
}

package main

import "fmt"

func main() {
	var d [3]int
	fmt.Scan(&d[0], &d[1], &d[2])

	id := 0
	sum := d[0]
	for i := 1; i < 3; i++ {
		if d[id] < d[i] {
			id = i
		}
		sum += d[i]
	}

	l := 0
	if 3*d[id] > 2*sum {
		l = 2 * (sum - d[id])
	} else {
		l = sum
	}

	fmt.Println(l)
}

package main

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

func main() {
	var d1, d2 ,d3, s uint16
	in := bufio.NewReader(os.Stdin)
	fmt.Fscanf(in, "%d %d %d\n", &d1,&d2, &d3)
	if d1 > d2 && d1 > d3{
		s += d2 * 2
		s += d3 * 2
	}else if d2 > d1 && d2 > d3{
		s += d1 * 2
		s += d3 * 2
	}else if d3 > d1 && d3 > d2{
		s += d1 * 2
		s += d2 * 2
	}else{
		if d2 >= d3{
			s += d1 * 2
			s += d2 * 2
		}
	}
	fmt.Println(s)
}

package main

import (
	"fmt"
	"log"
)

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

func main() {
	var d1, d2, d3 int
	_, err := fmt.Scanf("%d %d %d", &d1, &d2, &d3)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(min(2*d1+2*d2, d1+d2+d3))
}

package main

import (
	"fmt"
	"os"
)

func main() {
	var d [3]int
	fmt.Fscanln(os.Stdin, &d[0], &d[1], &d[2])

	if d[0]+d[1]+d[2] <= 2*(d[0]+d[1]) {
		fmt.Println(d[0] + d[1] + d[2])
	} else {
		fmt.Println(2 * (d[0] + d[1]))
	}
}

package main

import (
	"fmt"
	"os"
)

func main() {
	var d [3]int
	fmt.Fscanln(os.Stdin, &d[0], &d[1], &d[2])

	if d[0]+d[1]+d[2] < 2*(d[0]+d[1]) {
		fmt.Println(d[0] + d[1] + d[2])
	} else {
		fmt.Println(2 * (d[0] + d[1]))
	}
}

package main

import (
	"fmt"
)

func main() {
	var d1, d2, d3 int
	fmt.Scanf("%d %d %d", &d1, &d2, &d3)

	if d1*2+d2*2 < d1+d2+d3 {
		fmt.Println(d1*2 + d2*2)
	} else {
		fmt.Println(d1 + d2 + d3)
	}
}

package main;

import (
    "fmt"
)

func main() {
    var a, b, c int
    fmt.Scanf("%d%d%d", &a, &b, &c)
    x := 2 * a + 2 * b
    y := a + b + c
    if x < y {
        fmt.Println(x)
    } else {
        fmt.Println(y)
    }
}

package main

import "fmt"

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

func main() {
	var d1, d2, d3 int
	fmt.Scanf("%d %d %d", &d1, &d2, &d3)

	ret := min(d1 + min(d1 + 2 * d2, d3 + d2),
			   d2 + min(d2 + 2 * d1, d3 + d1))
	fmt.Printf("%d", ret)
}

package main

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

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

type MySlice [][2]int

func (slice MySlice) Len() int           { return len(slice) }
func (slice MySlice) Less(i, j int) bool { return slice[i][1] < slice[j][1] }
func (slice MySlice) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

func main() {
	ini()
	defer writer.Flush()

	d1 := scanInt()
	d2 := scanInt()
	d3 := scanInt()

	if d3+d2+d1 < 2*(d1+d2) {
		writer.WriteString(strconv.Itoa(d3 + d2 + d1))
	} else {
		writer.WriteString(strconv.Itoa(2 * (d1 + d2)))
	}

	return
}

func binSearch(a []int, key int) int {
	l := -1
	r := len(a)
	for l < r-1 {
		m := (l + r) / 2
		if a[m] < key {
			l = m
		} else {
			r = m
		}
	}

	if a[r] != key {
		return -1
	}

	return r
}

func ini() {
	scanner = bufio.NewScanner(os.Stdin)
	writer = bufio.NewWriter(os.Stdout)
	scanner.Split(bufio.ScanWords)
}

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

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


package main

import "fmt"

func main() {
    h := "hello"
    var s string
    fmt.Scan(&s)
    in := 0
    for i := 0; (i < len(s)) && (in < 5); i++ {
        if s[i] == h[in] { in++ }
    }
    if in == 5 { fmt.Println("YES") } else { fmt.Println("NO") }
}

package main

import (
	"fmt"
)

func main() {
	var s string
	hello := "hello"
	fmt.Scan(&s)
	for i := range s {
		if s[i] == hello[0] {
			hello = hello[1:]
			if len(hello) == 0 {
				fmt.Println("YES")
				return
			}
		}
	}
	fmt.Println("NO")
}

package main

import (
	"fmt"
)

func main() {
	var w, res string
	fmt.Scanln(&w)
	for _, y := range w {
		switch string(y) {
		case "h":
			if res == "" {
				res = "h"
			}
		case "e":
			if res == "h" {
				res = "he"
			}
		case "l":
			if res == "he" {
				res = "hel"
			} else if res == "hel" {
				res = "hell"
			}
		case "o":
			if res == "hell" {
				res = "hello"
			}

		}
	}

	if res == "hello" {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}

}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var istring string
	_, _ = fmt.Scan(&istring)
	var check = []string{"h","e","l","l","o"}
	j:=0
	count :=0
	temp := strings.Split(istring,"")
	for i:=0; i<len(temp); i++ {
		if temp[i] == check[j] {
			count++
			if count == 5 {
				break
			} else {
				j++
			}
		}
	}
	if count == 5 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var str string
	scanner.Scan()
	str = scanner.Text()
	var word = "hello"
	var index = 0
	key := rune(word[index])
	for _, char := range str {
		if char == key {
			index++
			if index == len(word) {
				fmt.Print("YES")
				return
			}else {
				key = rune(word[index])
			}
		}
	}
	fmt.Print("NO")
}

package main

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

func main() {
	str := "hello"
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	strInp := scanner.Text()
	var count int64
	var i, j, length int64 = 0, 0, int64(len(strInp))

	for i = 0; i < length; i++ {

		if strInp[i] == str[j] {
			count++
			j++
		}

		if count == 5 {
			break
		}
	}

	if count == 5 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

func main() {
	var s string
	fmt.Fscanf(os.Stdin, "%s\n", &s)
	index1 := strings.Index(s, "h")
	s = s[index1+1:]
	index2 := strings.Index(s, "e")
	s = s[index2+1:]
	index3 := strings.Index(s, "l")
	s = s[index3+1:]
	index4 := strings.Index(s, "l")
	s = s[index4+1:]
	index5 := strings.Index(s, "o")
	if index5 >= 0 && index4 >= 0 && index3 >= 0 && index2 >= 0 && index1 >= 0 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

func main() {
	var palabra string

	helloArray := []string{"h","e","l","l","o"}
	hello := make(map[string]bool)

	for _, item := range helloArray{
		hello[item] = false
	}

	fmt.Scanln(&palabra)
	strings.Split("", palabra)

	indexCounter := 0

	for i := 0; i < len(palabra); i++{
		if indexCounter < len(helloArray) {
			if string(palabra[i]) == helloArray[indexCounter] {
				hello[helloArray[indexCounter]] = true

				indexCounter++
			}
		}else{
			break
		}
	}

	for _, item := range helloArray{
		//fmt.Println(item, hello[item])

		if hello[item] == false{
			fmt.Println("NO")
			os.Exit(0)
		}
	}
	fmt.Println("YES")
}

package main

import (
"fmt"
)

func main() {
	var inp,hello string
	hello = "hello"
	fmt.Scan(&inp)
	it := 0
	for i:=0;i<len(inp)&&it<5;i++ {
		if(inp[i]==hello[it]){
			it++
		}
	}
	if(it==5){
		fmt.Print("YES")
	} else {
		fmt.Print("NO")
	}
	fmt.Println("")
}

package main

import (
	"fmt"
	"os"
)

//import "strings"

//import "math"
//import "strconv"
//import "sort"

func main() {

	str := "hello*"

	d := ""

	fmt.Scan(&d)

	cur := 0

	for i := 0; i < len(d); i++ {

		if str[cur] == d[i] {
			cur++
		}
		if cur == 5 {
			fmt.Println("YES")
			os.Exit(0)
		}
	}
	fmt.Println("NO")
}

package main

import (
	"fmt"
	"strings"
)

func find(wanted, word string) bool {
	var first string
	for len(wanted) > 0 && len(word) > 0 {
		first, wanted = string(wanted[0]), wanted[1:]
		index := strings.Index(word, first)
		if index == -1 {
			return false
		}
		word = word[index+1:]
	}
	return len(wanted) == 0
}

func main() {
	var word string

	wanted := "hello"

	fmt.Scan(&word)
	if find(wanted, word) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}

}

package main

import (
  "fmt"
)

func main() {
  var s string
  h, e, l1, l2, o := false, false, false, false, false
  fmt.Scan(&s)
  for _,val := range s {
    switch ue := string(val); {
    case ue=="h":
      h = true
    case ue=="e"&&h:
      e = true
    case ue=="l"&&!l1&&h&&e:
      l1 = true
    case ue=="l"&&l1&&h&&e:
      l2 = true
    case ue=="o"&&h&&e&&l1&&l2:
      o = true
    }
  }
  if h && e && l1 && l2 && o {
    fmt.Print("YES")
  }  else {
    fmt.Print("NO")
  }
}

package main

import (
	"fmt"
)

// INPUT
// ahhellllloou -> YES
// hlelo -> NO
// helhcludoo -> YES
// pnnepelqomhhheollvlo -> YES

func main() {
	var word, greeting string
	var greetingPos int
	greeting = "hello"

	fmt.Scanf("%v", &word)

	for pos, char := range word {
		if greetingPos > 4 {
			break
		}

		if greeting[greetingPos] == word[pos] {
			if char == 'h' {
				greetingPos = 0
			}
			greetingPos++
		}
	}

	if greetingPos == 5 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
)

func main() {
	var st string
	fmt.Scan(&st)
	hello := "hello"
	cur := 0
	for i := 0; cur < len(hello) && i < len(st); i++ {
		if st[i] == hello[cur] {
			cur++
		}
	}
	if cur == len(hello) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var st string
	fmt.Scan(&st)
	if contain(st, "hello") {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

func contain(st string, pattern string) bool {
	if pattern == "" {
		return true
	}
	i := strings.IndexByte(st, pattern[0])
	if i == -1 {
		return false
	}
	return contain(st[i+1:], pattern[1:])
}

package main

import "fmt"

func isOk(s string) bool {
	pattern := "hello"
	i := 0
	//j := 0
	for si, _ := range s {
		if s[si] == pattern[i] {
			i++
		}
		if i >= len(pattern) {
			break
		}
	}
	return i == len(pattern)
}

func main() {
	var str string
	fmt.Scanf("%s", &str)
	if isOk(str) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import "fmt"

func main() {

	var str string
	fmt.Scan(&str)

	hello := "hello"
	j := 0

	for i := 0; i < len(str) && j < len(hello); i++ {
		if str[i] == hello[j] {
			j++
		}
	}

	if j == len(hello) {
		fmt.Print("YES")
		return
	}
	fmt.Print("NO")
}

package main

import "fmt"

func foo(s string) bool {
	for i := 0; i < len(s); i++ {
		for j := i + 1; j < len(s); j++ {
			for k := j + 1; k < len(s); k++ {
				for l := k + 1; l < len(s); l++ {
					for m := l + 1; m < len(s); m++ {
						if s[i] == 'h' && s[j] == 'e' && s[k] == 'l' && s[l] == 'l' && s[m] == 'o' {
							return true
						}
					}
				}
			}
		}
	}
	return false
}

func main() {
	var s string
	fmt.Scan(&s)
	if foo(s) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
)

func main() {
	var s, target string = "", "hello"
	fmt.Scan(&s)
	var j int
	for i := range s {
		if s[i] == target[j] {
			j++
		}
		if j == 5 {
			fmt.Print("YES")
			break
		}
	}
	if j != 5 {
		fmt.Print("NO")
	}
}

package main

import (
	"fmt"
	"log"
)

var (
	hi = []string{"h", "e", "l", "l", "o"}
)

func main() {
	var (
		s       string
		counter int
		length  = len(hi)
	)
	if _, err := fmt.Scanf("%s\n", &s); err != nil {
		log.Fatal(err)
	}

	for i := range s {
		if s[i:i+1] == hi[counter] {
			counter++
			if counter == length {
				fmt.Println("YES")
				return
			}
		}
	}
	fmt.Println("NO")
}

package main

import "fmt"

func main() {
	hello := []byte("hello")

	var input string

	_, _ = fmt.Scanln(&input)

	byteinput := []byte(input)

	pos := 0

	for i := 0; i < len(byteinput); i ++ {
		if pos >= len(hello) {
			break;
		}
		if byteinput[i] == hello[pos] {
			pos ++
		}
	}

	if pos >= len(hello) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	s, _ := reader.ReadString('\n')
	goal := "hello"
	state := 0
	for i := 0; i < len(s)-1; i++ { //-1 newline
		if state == len(goal) { // early break
			break
		}

		if s[i] == goal[state] {
			state++
		}
	}

	if state == len(goal) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")

	}
}

package main

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

func main() {
	var scanner *bufio.Scanner

	scanner = bufio.NewScanner(os.Stdin)

	scanner.Scan()
	if err := scanner.Err(); err == nil {
		if regexp.MustCompile("\\w*h\\w*e\\w*l\\w*l\\w*o\\w*").MatchString(scanner.Text()) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}

}

package main

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

func main() {
	var scanner *bufio.Scanner
	var line string

	scanner = bufio.NewScanner(os.Stdin)

	if scanner.Scan() {
		line = scanner.Text()
		if managed(line) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func managed(message string) bool {
	var hello = []rune("hello")

	for _, letter := range message {
		if len(hello) == 0 {
			return true
		}
		if letter == hello[0] {
			hello = hello[1:]
		}
	}

	if len(hello) == 0 {
		return true
	}

	return false
}

package main

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

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

	var str, pat string

	fmt.Fscan(in, &str)
	pat = `h.*e.*l.*l.*o`

	matched, _ := regexp.MatchString(pat, str)
	if matched {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

type input struct {
	a string
}

func (c *input) Read(scanner *bufio.Scanner) {
	for scanner.Scan() {
		c.a = scanner.Text()
		return
	}

}

func main() {
	var inp input
	sc := bufio.NewScanner(os.Stdin)
	inp.Read(sc)

	var v1 int

	for _, b := range inp.a {
		s := string(b)
		if v1 == 0 && s == "h" {
			v1++
		}

		if v1 == 1 && s == "e" {
			v1++
		}
		if (v1 == 2 || v1 == 3) && s == "l" {
			v1++

		}

		if v1 == 4 && s == "o" {
			fmt.Println("YES")
			return

		}

	}
	fmt.Println("NO")
}

package main

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

type input struct {
	a string
}

func (c *input) Read(scanner *bufio.Scanner) {
	for scanner.Scan() {
		c.a = scanner.Text()
		return
	}

}

func main() {
	var inp input
	sc := bufio.NewScanner(os.Stdin)
	inp.Read(sc)
	if regexp.MustCompile(`.*h.*e.*l.*l.*o.*`).MatchString(inp.a){
	    fmt.Println("YES")
	} else{
	    fmt.Println("NO")
	}

}

package main

import "fmt"

func main() {
    h := "hello"
    var s string
    fmt.Scan(&s)
    in := 0
    for i := 0; (i < len(s)) && (in < 5); i++ {
        if s[i] == h[in] { in++ }
    }
    if in == 5 { fmt.Println("YES") } else { fmt.Println("NO") }
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var s string
	fmt.Scan(&s)
	for _, r := range "hello" {
		i := strings.Index(s, string(r))
		if i == -1 {
			fmt.Printf("NO")
			return
		}
		if i != len(s)-1 {
			s = s[i+1:]
		}
	}
	fmt.Printf("YES")
}

/* https://codeforces.com/problemset/problem/58/A
A. Chat room
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
Vasya has recently learned to type and log on to the Internet. He immediately entered a chat room and decided to say hello to everybody. Vasya typed the word s. It is considered that Vasya managed to say hello if several letters can be deleted from the typed word so that it resulted in the word "hello". For example, if Vasya types the word "ahhellllloou", it will be considered that he said hello, and if he types "hlelo", it will be considered that Vasya got misunderstood and he didn't manage to say hello. Determine whether Vasya managed to say hello by the given word s.

Input
The first and only line contains the word s, which Vasya typed. This word consisits of small Latin letters, its length is no less that 1 and no more than 100 letters.

Output
If Vasya managed to say hello, print "YES", otherwise print "NO".

Examples
inputCopy
ahhellllloou
outputCopy
YES
inputCopy
hlelo
outputCopy
NO
*/

package main

import "fmt"

func main() {
	var hello_index int
	var input_string string
	hello := []rune("hello")
	fmt.Scanln(&input_string)
	for _, letter := range input_string {
		if letter == hello[hello_index] {
			hello_index++
			if hello_index == 5 {
				fmt.Println("YES")
				return
			}
		}
	}
	fmt.Println("NO")
}

package main

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

func main() {
	var h byte
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanRunes)
	for scanner.Scan() {
		l := scanner.Text()
		switch {
		case l == "h" && h == 0: // 0b00000
			h = 32 // 0b10000
		case l == "e" && h == 32: // 0b10000
			h = 48 // 0b11000
		case l == "l" && h == 48: // 0b11000
			h = 56 // 0b11100
		case l == "l" && h == 56: // 0b11100
			h = 60 // 0b11110
		case l == "o" && h == 60: // 0b11110
			h = 62 // 0b11111
			break
		}
	}

	if h == 62 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
)

func main() {
	var x string
	var ref string = "hello"
	_, _ = fmt.Scan(&x)
	ref_index:= 0;
	for _, char := range(x) {
		if uint8(char) == ref[ref_index] {
			ref_index++
			if ref_index == 5 {
				break
			}
		}
	}

	if ref_index == 5 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

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 s string
	scanf("%s\n", &s)
	h := "hello"
	j := 0
	i := 0
	for i < len(s) && j < len(h) {

		if s[i] == h[j] {
			j++
		}
		i++
	}
	if j == len(h) {
		printf("YES\n")
	} else {
		printf("NO\n")
	}
}

/*
Chat room
time limit per test2 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
Vasya has recently learned to type and log on to the Internet. He immediately entered a chat room and decided to say hello to everybody. Vasya typed the word s. It is considered that Vasya managed to say hello if several letters can be deleted from the typed word so that it resulted in the word "hello". For example, if Vasya types the word "ahhellllloou", it will be considered that he said hello, and if he types "hlelo", it will be considered that Vasya got misunderstood and he didn't manage to say hello. Determine whether Vasya managed to say hello by the given word s.

Input
The first and only line contains the word s, which Vasya typed. This word consisits of small Latin letters, its length is no less that 1 and no more than 100 letters.

Output
If Vasya managed to say hello, print "YES", otherwise print "NO".

Sample test(s)
input
ahhellllloou
output
YES
input
hlelo
output
NO
*/
package main

import (
	"fmt"
)

func main() {
	var (
		S string
		hello = []rune("hello")
	)
	fmt.Scanf("%s", &S)
	s := []rune(S)
	lens := len(s)
	lenHello := len(hello)
	if lens < lenHello {
		fmt.Println("NO")
		return
	}
	var i, j int
	for ; i < lenHello; {
		for ; j < lens; j++ {
			if s[j] == hello[i] {
				i++
				j++
				break
			}
		}
		if j >= lens {
			break
		}
	}
	if i == lenHello {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import "fmt"

func main() {
	hello := "hello"
	var message string
	fmt.Scan(&message)
	var offset int
	for _, character := range message {
		if character == rune(hello[offset]) {
			offset += 1
		}

		if offset == len(hello) {
			fmt.Print("YES")
			return
		}
	}
	fmt.Print("NO")
}

package main
import "fmt"
func main () {
    var n string
    h:="hello"
    a:="NO"
    fmt.Scan(&n)
    ph:=0
    for i:=0;i<len(n);i++ {
        if n[i]==h[ph] {
            if ph==4 {
                a="YES"
                break
            } else {
                ph++
            }
        }
    }
    fmt.Println(a)
}

package main

import "fmt"

func main() {
	h := "hello"
	var s string
	fmt.Scan(&s)
	in := 0
	for i := 0; i < len(s) && in < 5; i++ {
		if s[i] == h[in] {
			in++
		}
	}
	if in == 5 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import "fmt"

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

	c := []byte{'h', 'e', 'l', 'o'}
	cont := []int{1, 1, 2, 1}
	flag := 0
	hitNum := 0

	for i := 0; i < len(word); i++ {
		if word[i] == c[flag] {
			hitNum += 1
			if hitNum >= cont[flag] {
				hitNum = 0
				flag += 1
			}
		}

		if flag >= len(c) {
			fmt.Print("YES")
			return
		}
	}

	fmt.Print("NO")
}

package main

import (
	"bufio"
	"fmt"
	"os"
)
var r *bufio.Reader = bufio.NewReader(os.Stdin)
var w *bufio.Writer = bufio.NewWriter(os.Stdout)

func print( a ...interface{}) { fmt.Fprint(w, a...) }
func scan( a ...interface{})  { fmt.Fscan(r, a...) }

func main() {
	defer w.Flush()

	var a string
	fmt.Scan(&a)

	var h = "hello"
	var index = 0
	for i := 0; i < len(a) && index < 5; i++{
		if h[index] == a[i]  {
			index++
		}
	}
	if index >= 5 {
		print("YES")
	}else {
		print("NO")
	}
}

package main

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

var s string

func main() {
	stdin := os.Stdin
	// stdin, _ = os.Open("1.in")
	reader := bufio.NewReaderSize(stdin, 1<<20)
	fmt.Fscanf(reader, "%s\n", &s)

	cnt := "hello"
	ans := "NO"
	for i := 0; i < len(s); i++ {
		if s[i] == cnt[0] {
			if len(cnt) == 1 {
				ans = "YES"
				break
			}
			cnt = cnt[1:len(cnt)]
		}
	}
	fmt.Println(ans)
}

package main

import "fmt"
import "strings"

func main() {
	var s string
	fmt.Scan(&s)
	pos := strings.Index(s, "h")
	if pos == -1 {
		fmt.Print("NO")
		return
	}
	s = s[pos+1:]
	pos = strings.Index(s, "e")
	if pos == -1 {
		fmt.Print("NO")
		return
	}
	s = s[pos+1:]
	pos = strings.Index(s, "l")
	if pos == -1 {
		fmt.Print("NO")
		return
	}
	s = s[pos+1:]
	pos = strings.Index(s, "l")
	if pos == -1 {
		fmt.Print("NO")
		return
	}
	s = s[pos+1:]
	pos = strings.Index(s, "o")
	if pos == -1 {
		fmt.Print("NO")
		return
	}
	fmt.Print("YES")
}

package main

import (
	"fmt"
)

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

	h := "hello"
	c := 0
	for i := 0; i < len(line); i++ {
		if line[i] == h[c] {
			c++
			if c == len(h) {
				fmt.Println("YES")
				return
			}
		}
	}

	fmt.Println("NO")
}

package main

import (
	"fmt"
)

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

	count := 0
	for _, c := range line {
		switch c {
		case 'h':
			if count == 0 {
				count++
			}
		case 'e':
			if count == 1 {
				count++
			}
		case 'l':
			if count == 2 || count == 3 {
				count++
			}
		case 'o':
			if count == 4 {
				count++
			}
		}
	}

	if count == 5 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import "fmt"

func main() {
	var hello = "hello"
	var s string
	fmt.Scan(&s)
	idx := 0
	for i := 0; i < len(s) && idx < 5; i ++ {
		if s[i] == hello[idx] {
			idx ++;
		}
	}
	if (idx >= 5) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
)

// ahhellllloou

func solve(s string) string {
	i := 0
	var seen string = ""
	for i < len(s) {
		if seen == "" && s[i] == 'h' {
			seen = "h"
		} else if seen == "h" && s[i] == 'e' {
			seen = "he"
		} else if seen == "he" && s[i] == 'l' {
			seen = "hel"
		} else if seen == "hel" && s[i] == 'l' {
			seen = "hell"
		} else if seen == "hell" && s[i] == 'o' {
			seen = "hello"
			return "YES"
		}
		i++
	}
	return "NO"
}

func main() {
	var s string
	fmt.Scanln(&s)
	sol := solve(s)
	fmt.Println(sol)
}

package main

import "fmt"

func main() {
	var s string
	fmt.Scan(&s)
	hi := "hello"
	ans := false
	j := 0
	for i := 0; i < len(s); i++ {
		if s[i] == hi[j] {
			j += 1
		}
		if j == len(hi) {
			ans = true
			break
		}
	}
	if ans {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import "fmt"

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

    var dst string = "hello"
    id := 0
    total := len(dst)
    for i := 0; i < len(s) && id < total; i++ {
        if s[i] == dst[id] {
            id++
        }
    }

    if id == total {
        fmt.Println("YES")
    } else {
        fmt.Println("NO")
    }
}

//  URL: http://codeforces.com/problemset/problem/58/A
//  ~ Basic Implementation Problem

package main

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

func isWordIn(w string, s string) string {
	if len(w) == 0 {
		return "YES"
	}
	if len(s) == 0 {
		return "NO"
	}
	if string(w[0]) != string(s[0]) {
		return isWordIn(w, s[1:])
	} else {
		return isWordIn(w[1:], s[1:])
	}
}

func main() {
	reader, writer := bufio.NewReader(os.Stdin), bufio.NewWriter(os.Stdout)
	defer writer.Flush()
	var s string
	fmt.Fscanf(reader, "%s\n", &s)
	fmt.Fprintf(writer, "%s\n", isWordIn("hello", s))
}

package main

import "fmt"

func main() {
    var s string
    fmt.Scan(&s)
    t := "hello"
    ls, lt, i, j := len(s), 5, 0, 0
    for i < ls && j < lt {
        if s[i] == t[j] {
            i ++
            j ++
        } else {
            i ++
        }
    }
    if (j == lt) {
        fmt.Println("YES")
    } else {
        fmt.Println("NO")
    }
}

package main

import (
    "fmt"
    )

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

    h := "hello"
    i := 0
    for _, c := range s {
        if i == len(h) {
            break
        }
        if c == rune(h[i]) {
            i++
        }
    }
    if i == len(h) {
        fmt.Println("YES")
        return
    }
    fmt.Println("NO")
}

package main
import (
    "fmt"
)

func main() {
    var word string
    fmt.Scanf("%s", &word)

    hello := "hello"
    counter := 0

    for _, r := range word {
        if counter < len(hello) {
            //fmt.Println("r: ",r,", hello: ", hello[counter])
            if uint8(r) == hello[counter] {
              counter++
            }
        }
    }

    switch counter {
        case 5: fmt.Println("YES")
        default: fmt.Println("NO")
    }
}

package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanRunes)
	expected := []rune{'h', 'e', 'l', 'l', 'o'}
	for scanner.Scan() {
		b := scanner.Text()
		br := rune(b[0])
		if br == expected[0] {
			if len(expected) == 1 {
				expected = expected[0:0]
				break
			}
			expected = expected[1:]
		}
	}
	if len(expected) == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println(("NO"))
	}
}

package main

import "fmt"

func main() {
	var s, s2 string
	var tmp int
	var flag bool
	fmt.Scanf("%s", &s)
	for i := range s {
		if tmp == 0 {
			if s[i] == 'h' {
				s2 = s2 + string(s[i])
				tmp++
			}
		} else if tmp == 1 {
			if s[i] == 'e' {
				s2 = s2 + string(s[i])
				tmp++
			}
		} else if tmp == 2 {
			if s[i] == 'l' {
				s2 = s2 + string(s[i])
				tmp++
			}
		} else if tmp == 3 {
			if s[i] == 'l' {
				s2 = s2 + string(s[i])
				tmp++
			}
		} else if tmp == 4 {
			if s[i] == 'o' {
				s2 = s2 + string(s[i])
				tmp++
			}
		}
		if tmp == 5 {
			flag = true
			break
		}
	}
	if flag {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import "fmt"

func main() {
	var s string
	var tmp int
	var flag bool
	fmt.Scanf("%s", &s)
	for i := range s {
		if tmp == 0 {
			if s[i] == 'h' {
				tmp++
			}
		} else if tmp == 1 {
			if s[i] == 'e' {
				tmp++
			}
		} else if tmp == 2 {
			if s[i] == 'l' {
				tmp++
			}
		} else if tmp == 3 {
			if s[i] == 'l' {
				tmp++
			}
		} else if tmp == 4 {
			if s[i] == 'o' {
				tmp++
			}
		}
		if tmp == 5 {
			flag = true
			break
		}
	}
	if flag {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	var str []byte
	str, _, _ = reader.ReadLine()
	var hello []byte = []byte{'h', 'e', 'l', 'l', 'o'}
	var i byte
	for _, v := range str {
		if v == hello[i] {
			i++
			if i == byte(len(hello)) {
				fmt.Println("YES")
				return
			}
		}
	}
	fmt.Println("NO")
}

package main

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

//========== Implement Algorithm =======================
func solution(str string) bool {
	if len(str) < 5 {
		return false
	}
	h := false
	e := false
	l := false
	o := false
	lcount := 0
	for x := 0; x < len(str); x++ {
		if h && e && l && o {
			return true
		}

		if string(str[x]) == "h" {
			h = true
		} else if string(str[x]) == "e" && h {
			e = true
		} else if string(str[x]) == "l" && h && e {
			lcount++
			if lcount == 2 {
				l = true
			}

		} else if string(str[x]) == "o" && h && e && l {
			o = true
		}
	}

	return h && e && l && o
}

func main() {

	scanner := bufio.NewScanner(os.Stdin)

	//================== Variables used ====================
	var str string
	var ret bool
	//======================================================

	//============== Get return value from File ============
	if len(os.Args) >= 2 {

		file, err := os.Open(os.Args[1])
		if err != nil {
			log.Fatalf("failed opening file: %s", err)
		}
		scanner = bufio.NewScanner(file)
		defer file.Close()

	}
	scanner.Split(bufio.ScanWords)
	//======================= I/O ==========================
	scanner.Scan()
	str = scanner.Text()
	//======================================================
	ret = solution(str)
	//==================== OUTPUT ==========================
	if ret {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import ("fmt")

func main(){
	var line string
	b := "hello"
	scan(&line)
	p := 0
	for i := 0; i < len(line); i++{
		if p < 5 && line[i] == b[p]{p++}
	}
	if p == 5 {
		sout("YES")
	}else{
		sout("NO")
	}
}

func scan(in ... interface{}){
	for _,k := range in{
		fmt.Scan(k)
	}
}

func sout(obj ... interface{}){
	for _, k := range obj{
		fmt.Print(k)
	}
	//fmt.Println()
}

package main

import (
	"fmt"
)

func main() {
	var s string
	fmt.Scan(&s)
	hell := "hello"
	recovered := 0
	for i := range s {
		if s[i] == hell[recovered] {
			recovered++
		}
		if recovered == 5 {
			fmt.Print("YES")
			return
		}
	}
	fmt.Print("NO")
}

package main

import (
  "fmt"
)

func main() {
  var s string
  word := "hello"
  var count, l int
  l = 4
  fmt.Scanf("%s", &s)

  for i:=0; i < len(s); i++ {
    if (s[i] == word[count]) {
      count++
    }
    if(count > l) {
      break
    }
  }

  if(count > l) {
    fmt.Println("YES")
  } else {
    fmt.Println("NO")
  }
}

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	var str string
	fmt.Fscanln(reader, &str)
	slice := []rune(str)
	sym := []rune("hello")
	index := 0
	flag := false
	for _, s := range slice {
		check := sym[index]
		if s == check {
			if index == 4 {
				flag = true
				fmt.Println("YES")
				break
			} else {
				index++
			}
		}
	}
	if !flag {
		fmt.Println("NO")
	}
}

package main

import "fmt"

func main() {
	s := ""
	fmt.Scanln(&s)
	w := []rune{'h', 'e', 'l', 'l', 'o'}
	lenw := len(w)
	next := 0
	for _, c := range s {
		if next >= lenw {
			break
		}
		if c == w[next] {
			next++
		}
	}
	if next >= lenw {
		fmt.Println("YES")
		return
	}
	fmt.Println("NO")
}

package main

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

func main() {
	s, _ := bufio.NewReader(os.Stdin).ReadBytes('\n')
	i, h, ello := 0, byte('h'), []byte("ello")
	for _, b := range s {
		if h == b {
			if i == 4 {
				fmt.Print("YES")
				return
			}
			h = ello[i]
			i += 1
		}
	}
	fmt.Print("NO")
}

package main

import "fmt"

func main() {
	var s []byte
	fmt.Scan(&s)
	i, h, ello := -1, byte('h'), []byte{'e', 'l', 'l', 'o'}
	for _, b := range s {
		if h == b {
			i++
			if i == 4 {
				fmt.Print("YES")
				return
			}
			h = ello[i]
		}
	}
	fmt.Print("NO")
}

package main

import "fmt"

func main() {
    h := "hello"
    var s string
    fmt.Scan(&s)
    in := 0
    for i := 0; (i < len(s)) && (in < 5); i++ {
        if s[i] == h[in] { in++ }
    }
    if in == 5 { fmt.Println("YES") } else { fmt.Println("NO") }
}

package main

import "fmt"
import "bytes"
import "io/ioutil"
import "os"

func task_solution(line []byte) string {
	sub := []byte{'h', 'e', 'l', 'l', 'o'}
	var i, j int
	for i, j = 0, 0; i < len(sub) && j < len(line); j += 1 {
		if line[j] == sub[i] {
			i += 1
		}
	}
	if i == len(sub) && j <= len(line) {
		return "YES"
	}
	return "NO"
}

func main() {
	in_raw, err := ioutil.ReadAll(os.Stdin)
	if err != nil {
		panic(err)
	}

	fmt.Println(task_solution(bytes.TrimSpace(in_raw)))
}

package main

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

import "fmt"

const sub = "hello"

func task_solution(line string) string {
	var i, j int
	for i, j = 0, 0; i < len(sub) && j < len(line); j += 1 {
		if sub[i] == line[j] {
			i += 1
		}
	}
	if i == len(sub) && j <= len(line) {
		return "YES"
	}
	return "NO"
}

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

	fmt.Println(task_solution(line))
}

// Author: sighduck
// URL: https://codeforces.com/problemset/problem/58/A

package main

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

func Solve(s string) string {
	order := "hello"
	i := 0
	j := 0
	for i < 5 && j < len(s) {
		if s[j] == order[i] {
			j += 1
			i += 1
		} else {
			j += 1
		}
	}
	if i == 5 {
		return "YES"
	}
	return "NO"
}

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

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

	fmt.Fprintf(writer, "%s\n", Solve(s))
}

package main

import (
	"fmt"
	"regexp"
)

func main() {
	var s string
	fmt.Scanln(&s)

	var hello = regexp.MustCompile(`h.*e.*l.*l.*o`)

	if hello.MatchString(s) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}

}

package main

import (
	"fmt"
)

// Snippet: isSubSeq
func isSubseq(s1 string, s2 string) bool {
	var k = 0
	for i := 0; i < len(s2); i++ {
		if s2[i] == s1[k] {
			k++
			if k == len(s1) {
				return true
			}
		}
	}
	return false
}

func main() {
	var s string
	fmt.Scan(&s)
	if isSubseq("hello", s) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
	"os"
)

//import "strings"

//import "math"
//import "strconv"
//import "sort"

func main() {

	str := "hello*"

	d := ""

	fmt.Scan(&d)

	cur := 0

	for i := 0; i < len(d); i++ {

		if str[cur] == d[i] {
			fmt.Println(i)
			cur++
		}
		if cur == 5 {
			os.Exit(0)
		}
	}
	fmt.Println("NO")
}

package main

import (
	"fmt"
	"os"
)

//import "strings"

//import "math"
//import "strconv"
//import "sort"

func main() {

	str := "hello"

	d := ""

	fmt.Scan(&d)

	cur := 0

	for i := 0; i < len(d); i++ {

		if str[cur] == d[i] {
			cur++
		}
		if cur == 4 {
			fmt.Println("YES")
			os.Exit(0)
		}
	}
	fmt.Println("NO")
}

package main

import (
	"fmt"
	"os"
)

//import "strings"

//import "math"
//import "strconv"
//import "sort"

func main() {

	str := "hello*"

	d := ""

	fmt.Scan(&d)

	cur := 0

	for i := 0; i < len(d); i++ {

		if str[cur] == d[i] {
			fmt.Println(i)
			cur++
		}
		if cur == 4 {
			os.Exit(0)
		}
	}
	fmt.Println("NO")
}

package main

import (
	"fmt"
	"strings"
)

// INPUT
// ahhellllloou -> YES
// hlelo -> NO
// helhcludoo -> YES

func main() {
	var word, wholeWord string

	fmt.Scanf("%v", &word)

	for _, char := range word {
		if wholeWord == "" || !strings.Contains(wholeWord, string(char)) && (char == 'h' || char == 'e' || char == 'l' || char == 'o') {
			wholeWord += string(char)
		}
	}

	if strings.Contains(wholeWord, "helo") {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
	"strings"
)

// INPUT
// ahhellllloou -> YES
// hlelo -> NO
// helhcludoo -> YES

func main() {
	var word, wholeWord string

	fmt.Scanf("%v", &word)

	for _, char := range word {
		if wholeWord == "" || !strings.Contains(wholeWord, string(char)) && (char == 'h' || char == 'e' || char == 'l' || char == 'o') {
			wholeWord += string(char)
		}
	}

	fmt.Println(wholeWord)

	if strings.Contains(wholeWord, "helo") {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
	"strings"
)

// INPUT
// ahhellllloou -> YES
// hlelo -> NO

func main() {
	var word, wholeWord string

	fmt.Scanf("%v", &word)

	for _, char := range word {
		if wholeWord == "" || wholeWord[len(wholeWord)-1] != byte(char) {
			wholeWord += string(char)
		}
	}

	if strings.Contains(wholeWord, "helo") {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import "fmt"
import "strings"

func foo(s string) bool {
	var i int
	if i = strings.Index(s, "h"); i == -1 {
		return false
	}
	if i = strings.Index(s, "e"); i == -1 {
		return false
	}
	if i = strings.Index(s, "l"); i == -1 {
		return false
	}
	if i = strings.Index(s, "l"); i == -1 {
		return false
	}
	if i = strings.Index(s, "o"); i == -1 {
		return false
	}
	return true
}

func main() {
	var s string
	fmt.Scan(&s)
	if foo(s) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import "fmt"
import "strings"

func foo(s string) bool {
	const l = "hello"
	for i, j := 0, 0; j < len(l); j++ {
		s = s[i:]
		if i = strings.Index(s[i:], string(l[j])); i == -1 {
			return false
		}
	}
	return true
	/*for i := 0; i < len(s); i++ {
		for j := i + 1; j < len(s); j++ {
			for k := j + 1; k < len(s); k++ {
				for l := k + 1; l < len(s); l++ {
					for m := l + 1; m < len(s); m++ {
						if s[i] == 'h' && s[j] == 'e' && s[k] == 'l' && s[l] == 'l' && s[m] == 'o' {
							return true
						}
					}
				}
			}
		}
	}*/
}

func main() {
	var s string
	fmt.Scan(&s)
	if foo(s) {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	s, _ := reader.ReadString('\n')
	goal := "hello"
	state := 0
	good := false
	for i := 0; i < len(s); i++ {
		if state == len(goal)-1 {
			good = true
			break
		}

		if s[i] == goal[state] {
			state++
		}
	}

	if good {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")

	}
}

package main

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

func main() {
	var scanner *bufio.Scanner

	scanner = bufio.NewScanner(os.Stdin)

	scanner.Scan()
	if err := scanner.Err(); err == nil {
		if regexp.MustCompile("\\w*[h ]+[e ]+[l ]+[l ]+[o ]+\\w*").MatchString(scanner.Text()) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}

}

package main

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

type input struct {
	a string
}

func (c *input) Read(scanner *bufio.Scanner) {
	for scanner.Scan() {
		c.a = scanner.Text()
		return
	}

}

func main() {
	var inp input
	sc := bufio.NewScanner(os.Stdin)
	inp.Read(sc)

	var h, e, l, l2 bool

	for _, b := range inp.a {
		s := string(b)
		if s ==  "h" {
			h = true
		}

		if h && s == "e" {
			e = true
		}
		if h && e && s == "l" {
			l = true

		}
		if h && e && l && s=="l" {
			l2 = true

		}
		if h && e && l && l2 && s == "o" {
			fmt.Println("YES")
			return
		}
	}
	fmt.Println("NO")
}

package main

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

type input struct {
	a string
}

func (c *input) Read(scanner *bufio.Scanner) {
	for scanner.Scan() {
		c.a = scanner.Text()
		return
	}

}

func main() {
	var inp input
	sc := bufio.NewScanner(os.Stdin)
	inp.Read(sc)

	var h, e, l, l2 bool

	for _, b := range inp.a {
		s := string(b)
		if s ==  "h" {
			h = true
		}

		if h && s == "e" {
			e = true
		}
		if h && e && s == "l" {
			l = true

		}
		if h && e && l && s=="l" {
			l2 = true

		}
		if h && e && l && l2 && s == "o" {
			return
		}
	}
	fmt.Println("NO")
}

package main

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

type input struct {
	a string
}

func (c *input) Read(scanner *bufio.Scanner) {
	for scanner.Scan() {
		c.a = scanner.Text()
		return
	}

}

func main() {
	var inp input
	sc := bufio.NewScanner(os.Stdin)
	inp.Read(sc)

	var h, e, l, l2 bool

	for i, b := range inp.a {
		var v1 int
		s := string(b)
		if s ==  "h" {
			v1 = i
			h = true
		}

		if v1 > i && h && s == "e" {
			v1 = i
			e = true
		}
		if v1 > i && h && e && s == "l" {
			v1 = i

			l = true

		}
		if v1 > i && h && e && l && s=="l" {
			v1 = i

			l2 = true

		}
		if v1 > i && h && e && l && l2 && s == "o" {
			fmt.Println("YES")
			return
		}
	}
	fmt.Println("NO")
}

package main

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

type input struct {
	a string
}

func (c *input) Read(scanner *bufio.Scanner) {
	for scanner.Scan() {
		c.a = scanner.Text()
		return
	}

}

func main() {
	var inp input
	sc := bufio.NewScanner(os.Stdin)
	inp.Read(sc)

	var h, e, l, l2 bool

	for _, b := range inp.a {
		s := string(b)
		if s ==  "h" {
			h = true
			if h && s == "e" {
				e = true
				if h && e && s == "l" {
					l = true
					if h && e && l && s=="l" {
						l2 = true
						if h && e && l && l2 && s == "o" {
							fmt.Println("YES")
							return
						}
					}
					}
				}
			}
		}
	fmt.Println("NO")
}

/*
Chat room
time limit per test2 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
Vasya has recently learned to type and log on to the Internet. He immediately entered a chat room and decided to say hello to everybody. Vasya typed the word s. It is considered that Vasya managed to say hello if several letters can be deleted from the typed word so that it resulted in the word "hello". For example, if Vasya types the word "ahhellllloou", it will be considered that he said hello, and if he types "hlelo", it will be considered that Vasya got misunderstood and he didn't manage to say hello. Determine whether Vasya managed to say hello by the given word s.

Input
The first and only line contains the word s, which Vasya typed. This word consisits of small Latin letters, its length is no less that 1 and no more than 100 letters.

Output
If Vasya managed to say hello, print "YES", otherwise print "NO".

Sample test(s)
input
ahhellllloou
output
YES
input
hlelo
output
NO
*/
package main

import (
	"fmt"
)

func main() {
	var (
		S string
		hello = []rune("hello")
	)
	fmt.Scanf("%s", &S)
	s := []rune(S)
	lens := len(s)
	lenHello := len(hello)
	if lens < lenHello {
		println("NO")
		return
	}
	var i, j int
	for ; i < lenHello; {
		for ; j < lens; j++ {
			if s[j] == hello[i] {
				i++
				j++
				break
			}
		}
		if j >= lens {
			break
		}
	}
	if i == lenHello {
		println("YES")
	} else {
		println("NO")
	}
}

/*
Chat room
time limit per test2 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
Vasya has recently learned to type and log on to the Internet. He immediately entered a chat room and decided to say hello to everybody. Vasya typed the word s. It is considered that Vasya managed to say hello if several letters can be deleted from the typed word so that it resulted in the word "hello". For example, if Vasya types the word "ahhellllloou", it will be considered that he said hello, and if he types "hlelo", it will be considered that Vasya got misunderstood and he didn't manage to say hello. Determine whether Vasya managed to say hello by the given word s.

Input
The first and only line contains the word s, which Vasya typed. This word consisits of small Latin letters, its length is no less that 1 and no more than 100 letters.

Output
If Vasya managed to say hello, print "YES", otherwise print "NO".

Sample test(s)
input
ahhellllloou
output
YES
input
hlelo
output
NO
*/
package main

import (
	"fmt"
)

func main() {
	var (
		S string
		hello = []rune("hello")
	)
	fmt.Scanf("%s\n", &S)
	s := []rune(S)
	lens := len(s)
	lenHello := len(hello)
	if lens < lenHello {
		println("NO")
		return
	}
	var i, j int
	for ; i < lenHello; {
		for ; j < lens; j++ {
			if s[j] == hello[i] {
				i++
				j++
				break
			}
		}
		if j >= lens {
			break
		}
	}
	if i == lenHello {
		println("YES")
	} else {
		println("NO")
	}
}

package main

import "fmt"

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

	c := []byte{'h', 'e', 'l', 'o'}
	cont := []int{1, 1, 2, 1}
	flag := 0
	hitNum := 0

	for i := 0; i < len(word); i++ {
		if word[i] == c[flag] {
			hitNum += 1
		} else {
			if hitNum < cont[flag] {
				flag = 0
			} else {
				flag += 1
				i--
			}
			hitNum = 0
		}

		if flag >= len(c) {
			fmt.Print("YES")
			return
		}
	}

	fmt.Print("NO")
}

package main

import (
	"fmt"
)

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

 	var h = "hello"
 	var index = 0
 	for i := 0; i < len(a) && index < 5; i++{
		if h[index] == a[i]  {
			index++
		}
	}
	if index >= 5 {
		print("YES")
	}else {
		print("NO")
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
)
var r *bufio.Reader = bufio.NewReader(os.Stdin)
var w *bufio.Writer = bufio.NewWriter(os.Stdout)

func print( a ...interface{}) { fmt.Fprint(w, a...) }
func scan( a ...interface{})  { fmt.Fscan(r, a...) }

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

	var h = "hello"
	var index = 0
	for i := 0; i < len(a) && index < 5; i++{
		if h[index] == a[i]  {
			index++
		}
	}
	if index >= 5 {
		print("YES")
	}else {
		print("NO")
	}
}

package main

import (
	"fmt"
)

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

	count := 0
	for _, c := range line {
		switch c {
		case 'h':
			count++
		case 'e':
			if count == 1 {
				count++
			}
		case 'l':
			if count == 2 || count == 3 {
				count++
			}
		case 'o':
			if count == 4 {
				count++
			}
		}
	}

	if count == 5 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
)

// ahhellllloou

func solve(s string) string {
	i := 0
	for i < len(s) {
		if s[i] == 'h' {
			i++
			for s[i] == 'h' {
				i++
			}
			if s[i] == 'e' {
				i++
				for s[i] == 'e' {
					i++
				}
				if s[i] == 'l' {
					i++
					for s[i] == 'l' {
						i++
					}
					if s[i] == 'o' {
						i++
						for s[i] == 'o' {
							return "YES"
							i++
						}
					} else {
						i++
					}
				}
			} else {
				i++
			}
		} else {
			i++
		}
	}
	return "NO"
}

func main() {
	var s string
	fmt.Scanln(&s)
	sol := solve(s)
	fmt.Println(sol)
}

package main

import "fmt"

func main() {
	var s string
	fmt.Scan(&s)
	hi := "hello"
	ans := false
	j := 0
	for i := 0; i < len(s); i++ {
		if s[i] == hi[j] {
			j += 1
		}
		if j == len(hi) {
			ans = true
			break
		}
	}
	fmt.Println(ans)
}

package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanRunes)
	expected := []rune{'h', 'e', 'l', 'l', 'o'}
	for scanner.Scan() {
		b := scanner.Text()
		br := rune(b[0])
		if br == expected[0] {
			if len(expected) == 1 {
				expected = expected[:]
				break
			}
			expected = expected[1:]
		}
	}
	if len(expected) == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println(("NO"))
	}
}

package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanRunes)
	expected := []rune{'h', 'e', 'l', 'l', 'o'}
	for scanner.Scan() {
		b := scanner.Text()
		br := rune(b[0])
		if br == expected[0] {
			if len(expected) > 1 {
				expected = expected[1:]
				continue
			}
			break
		}
	}
	if len(expected) == 0 {
		fmt.Println("YES")
	} else {
		fmt.Println(("NO"))
	}
}

package main

import "fmt"

func main() {
	var s, s2 string
	var tmp int
	var flag bool
	fmt.Scanf("%s", &s)
	for i := range s {
		if tmp == 0 {
			if s[i] == 'h' {
				s2 = s2 + string(s[i])
				tmp++
			}
		} else if tmp == 1 {
			if s[i] == 'e' {
				s2 = s2 + string(s[i])
				tmp++
			}
		} else if tmp == 2 {
			if s[i] == 'l' {
				s2 = s2 + string(s[i])
				tmp++
			}
		} else if tmp == 3 {
			if s[i] == 'l' {
				s2 = s2 + string(s[i])
				tmp++
			}
		} else if tmp == 4 {
			if s[i] == 'l' {
				s2 = s2 + string(s[i])
				tmp++
			}
		}
		if tmp == 5 {
			flag = true
			break
		}
	}
	if flag {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

//========== Implement Algorithm =======================
func solution(str string) bool {
	if len(str) < 6 {
		return false
	}
	h := strings.Count(str, "h") >= 1
	e := strings.Count(str, "e") >= 1
	l := strings.Count(str, "l") >= 2
	o := strings.Count(str, "o") >= 1
	return h && e && l && o
}

func main() {

	scanner := bufio.NewScanner(os.Stdin)

	//================== Variables used ====================
	var str string
	var ret bool
	//======================================================

	//============== Get return value from File ============
	if len(os.Args) >= 2 {

		file, err := os.Open(os.Args[1])
		if err != nil {
			log.Fatalf("failed opening file: %s", err)
		}
		scanner = bufio.NewScanner(file)
		defer file.Close()

	}
	scanner.Split(bufio.ScanWords)
	//======================= I/O ==========================
	scanner.Scan()
	str = scanner.Text()
	//======================================================
	ret = solution(str)
	//==================== OUTPUT ==========================
	if ret {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

//========== Implement Algorithm =======================
func solution(str string) bool {
	if len(str) < 6 {
		return false
	}
	h := false
	e := false
	l := false
	o := false
	lcount := 0
	for x := 0; x < len(str); x++ {
		if h && e && l && o {
			return true
		}
		if string(str[x]) == "h" {
			h = true
		} else if string(str[x]) == "e" && h {
			e = true
		} else if string(str[x]) == "l" && h && e {
			lcount++
			if lcount == 2 {
				l = true
			}

		} else if string(str[x]) == "o" && h && e && l {
			o = true
		}
	}

	return false
}

func main() {

	scanner := bufio.NewScanner(os.Stdin)

	//================== Variables used ====================
	var str string
	var ret bool
	//======================================================

	//============== Get return value from File ============
	if len(os.Args) >= 2 {

		file, err := os.Open(os.Args[1])
		if err != nil {
			log.Fatalf("failed opening file: %s", err)
		}
		scanner = bufio.NewScanner(file)
		defer file.Close()

	}
	scanner.Split(bufio.ScanWords)
	//======================= I/O ==========================
	scanner.Scan()
	str = scanner.Text()
	//======================================================
	ret = solution(str)
	//==================== OUTPUT ==========================
	if ret {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

//========== Implement Algorithm =======================
func solution(str string) bool {
	if len(str) < 6 {
		return false
	}
	h := false
	e := false
	l := false
	o := false
	lcount := 0
	for x := 0; x < len(str); x++ {
		if h && e && l && o {
			return true
		}

		if string(str[x]) == "h" {
			h = true
		} else if string(str[x]) == "e" && h {
			e = true
		} else if string(str[x]) == "l" && h && e {
			lcount++
			if lcount == 2 {
				l = true
			}

		} else if string(str[x]) == "o" && h && e && l {
			o = true
		}
	}

	return h && e && l && o
}

func main() {

	scanner := bufio.NewScanner(os.Stdin)

	//================== Variables used ====================
	var str string
	var ret bool
	//======================================================

	//============== Get return value from File ============
	if len(os.Args) >= 2 {

		file, err := os.Open(os.Args[1])
		if err != nil {
			log.Fatalf("failed opening file: %s", err)
		}
		scanner = bufio.NewScanner(file)
		defer file.Close()

	}
	scanner.Split(bufio.ScanWords)
	//======================= I/O ==========================
	scanner.Scan()
	str = scanner.Text()
	//======================================================
	ret = solution(str)
	//==================== OUTPUT ==========================
	if ret {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

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

//========== Implement Algorithm =======================
func solution(str string) bool {
	if len(str) < 6 {
		return false
	}
	h := false
	e := false
	l := false
	o := false
	lcount := 0
	for x := 0; x < len(str); x++ {
		if h && e && l && o {
			return true
		}
		if string(str[x]) == "h" {
			h = true
		} else if string(str[x]) == "o" {
			o = true
		} else if string(str[x]) == "l" {
			lcount++
			if lcount == 2 {
				l = true
			}

		} else if string(str[x]) == "e" {
			e = true
		}
	}

	return false
}

func main() {

	scanner := bufio.NewScanner(os.Stdin)

	//================== Variables used ====================
	var str string
	var ret bool
	//======================================================

	//============== Get return value from File ============
	if len(os.Args) >= 2 {

		file, err := os.Open(os.Args[1])
		if err != nil {
			log.Fatalf("failed opening file: %s", err)
		}
		scanner = bufio.NewScanner(file)
		defer file.Close()

	}
	scanner.Split(bufio.ScanWords)
	//======================= I/O ==========================
	scanner.Scan()
	str = scanner.Text()
	//======================================================
	ret = solution(str)
	//==================== OUTPUT ==========================
	if ret {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}

package main

import ("fmt")

func main(){
	var line string
	b := "hello"
	scan(&line)
	p := 0
	for i := 0; i < len(line); i++{
		if line[i] == b[p] && p < 4 {p++}
	}
	if p == 4 {
		sout("YES")
	}else{
		sout("NO")
	}
}

func scan(in ... interface{}){
	for _,k := range in{
		fmt.Scan(k)
	}
}

func sout(obj ... interface{}){
	for _, k := range obj{
		fmt.Print(k)
	}
	//fmt.Println()
}

package main

import (
  "fmt"
)

func main() {
  var s string
  word := "hello"
  var count, l int
  l = 4
  fmt.Scanf("%s", &s)

  for i:=0; i < len(s); i++ {
    if (s[i] == word[count]) {
      count++
    }
    if(count > l) {
      break
    }
  }

  if(count >= l) {
    fmt.Println("YES")
  } else {
    fmt.Println("NO")
  }
}

package main

import "fmt"

func main() {
	var s []byte
	fmt.Scan(&s)
	i, h, ello := 0, byte('h'), []byte{'e', 'l', 'l', 'o'}
	for _, b := range s {
		if h == b {
			if i == 3 {
				fmt.Print("YES")
				return
			}
			h = ello[i]
			i++
		}
	}
	fmt.Print("NO")
}

package main

import "fmt"
import "bytes"
import "io/ioutil"
import "os"

func task_solution(line []byte) string {
	substr := []byte{'h', 'e', 'l', 'l', 'o'}
	pos := 0
	for _, c := range substr {
		for pos < len(line) && line[pos] != c {
			pos += 1
		}
		// found char
		if pos < len(line) {
			pos += 1
		}
	}
	if pos < len(line) {
		return "YES"
	}
	return "NO"
}

func main() {
	in_raw, err := ioutil.ReadAll(os.Stdin)
	if err != nil {
		panic(err)
	}

	fmt.Println(task_solution(bytes.TrimSpace(in_raw)))
}

package main

import "fmt"
import "bytes"
import "io/ioutil"
import "os"

func task_solution(line []byte) string {
	substr := []byte{'h', 'e', 'l', 'l', 'o'}
	pos := 0
	for _, c := range substr {
		for pos < len(line) && line[pos] != c {
			pos += 1
		}
		// found char
		if pos < len(line) {
			pos += 1
		}
	}
	if pos <= len(line) {
		return "YES"
	}
	return "NO"
}

func main() {
	in_raw, err := ioutil.ReadAll(os.Stdin)
	if err != nil {
		panic(err)
	}

	fmt.Println(task_solution(bytes.TrimSpace(in_raw)))
}