package main import ( "bufio" "fmt" "os" "sort" "strconv" ) func main() { fsc := NewFastScanner() A := make([]int, 0) for i := 0; i < 9; i++ { A = append(A, fsc.NextInt()) } sort.Ints(A) cnt := 1 for i := 0; i < 9; i++ { if A[i] != cnt { fmt.Println(cnt) return } cnt++ } } //template type FastScanner struct { r *bufio.Reader buf []byte p int } func NewFastScanner() *FastScanner { rdr := bufio.NewReaderSize(os.Stdin, 1024) return &FastScanner{r: rdr} } func (s *FastScanner) Next() string { s.pre() start := s.p for ; s.p < len(s.buf); s.p++ { if s.buf[s.p] == ' ' { break } } result := string(s.buf[start:s.p]) s.p++ return result } func (s *FastScanner) NextLine() string { s.pre() start := s.p s.p = len(s.buf) return string(s.buf[start:]) } func (s *FastScanner) NextInt() int { v, _ := strconv.Atoi(s.Next()) return v } func (s *FastScanner) NextInt64() int64 { v, _ := strconv.ParseInt(s.Next(), 10, 64) return v } func (s *FastScanner) pre() { if s.p >= len(s.buf) { s.readLine() s.p = 0 } } func (s *FastScanner) readLine() { s.buf = make([]byte, 0) for { l, p, e := s.r.ReadLine() if e != nil { panic(e) } s.buf = append(s.buf, l...) if !p { break } } } func IntMax(a, b int) int { if a < b { return b } return a } func Int64Max(a, b int64) int64 { if a < b { return b } return a } func Float64Max(a, b float64) float64 { if a < b { return b } return a } func IntMin(a, b int) int { if a > b { return b } return a } func Int64Min(a, b int64) int64 { if a > b { return b } return a } func Float64Min(a, b float64) float64 { if a > b { return b } return a }