package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	if n == 2 {
		if s == 1 {
			submit(2)
		} else {
			submit(1)
		}
	}

	// highest num in left half
	if s != 1 && s == req(1, s) {
		l := int64(1)
		r := s - 1
		ans := l
		for l <= r {
			m := (l + r) / 2
			if req(m, s) == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := r
	for l <= r {
		m := (l + r) / 2
		if req(s, m) == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

import (
	"fmt"
)

func main() {
	var n, m2, res, leftStart, leftEnd, rightStart, rightEnd int

	fmt.Scan(&n)
	start, end := 1, n
	fmt.Printf("? %d %d\n", start, end)
	fmt.Scan(&m2)
	if n == 2 {
		if m2 == 2 {
			fmt.Print("! 1")
		} else {
			fmt.Print("! 2")
		}
		return
	}

	for {
		leftStart, leftEnd = start, start+(end-start)/2
		rightStart, rightEnd = leftEnd+1, end
		if m2 >= start && m2 <= end {
			if end-start == 1 {
				if start == m2 {
					start = end
				}
				break
			}
			if rightStart == rightEnd && m2 == rightEnd {
				leftStart, leftEnd = start, start
				rightStart, rightEnd = end-1, end-1
			}
		}
		//fmt.Println(start, end, leftStart, leftEnd, rightStart, rightEnd)
		if m2 <= leftEnd {
			fmt.Printf("? %d %d\n", min(leftStart, m2), leftEnd)
			fmt.Scan(&res)
			if res == m2 {
				start, end = leftStart, leftEnd
			} else {
				start, end = rightStart, rightEnd
			}
		} else {
			fmt.Printf("? %d %d\n", rightStart, max(rightEnd, m2))
			fmt.Scan(&res)
			if res != m2 {
				start, end = leftStart, leftEnd
			} else {
				start, end = rightStart, rightEnd
			}
		}
		if start == end {
			break
		}
	}
	fmt.Printf("! %d", start)
}

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

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

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)

	// highest num in left half
	if s != 1 && s == req(1, s) {
		l := int64(1)
		r := s - 1
		ans := l
		for l <= r {
			m := (l + r) / 2
			if req(m, s) == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := r
	for l <= r {
		m := (l + r) / 2
		if req(s, m) == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

const (
	MOD int64 = 1e9+7
	NL byte = byte('\n')
	SP byte = byte(' ')
)

var (
	in *bufio.Scanner
	out *bufio.Writer

	n int
	res int
)

func main() {
	initBuffer()
	var t int = 1
	// t = getInt()
	for i := 0; i < t; i++ {
		solve()
	}
	// test()
	out.Flush()
}

func solve() {
	initialize()
	input()
	count()
	output()
}

func initialize() {

}

func input() {
	n = getInt()
}

func count() {
	var i1, i2 int = 1, n
	printIt(i1, i2)
	var x int = getInt()
	if x == 1 {
		i1 = 2
	} else if x == n {
		i2 = n - 1
	} else {
		printIt(1, x)
		if x == getInt() {
			i2 = x - 1
		} else {
			i1 = x + 1
		}
	}
	var k int
	for i1 < i2 {
		k = (i1 + i2) / 2
		if x < i1 {
			printIt(x, k)
			if x == getInt() {
				i2 = k
			} else {
				i1 = k + 1
			}
		} else {
			if i1 + 1 == i2 {
				printIt(i2, x)
				if x == getInt() {
					i1++
				} else {
					i2--
				}
			} else {
				printIt(k, x)
				if x == getInt() {
					i1 = k
				} else {
					i2 = k - 1
				}
			}
		}
	}
	res = i1
}

func printIt(a, b int) {
	out.WriteString("? ")
	out.Write(intToBytes(a))
	out.WriteByte(SP)
	out.Write(intToBytes(b))
	out.WriteByte(NL)
	out.Flush()
}

func output() {
	out.WriteString("! ")
	out.Write(intToBytes(res))
}

func test() {
	fmt.Print()
}

func initBuffer() {
	in = bufio.NewScanner(os.Stdin)
	in.Buffer([]byte{}, 4 * 1024 * 1024)
	in.Split(scanWords)
	out = bufio.NewWriter(os.Stdout)
}

func scanWords(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}
	i := bytes.IndexByte(data, '\n')
	j := bytes.IndexByte(data, ' ')
	ind := min(i, j)
	if ind < 0 {
		ind = max(i, j)
	}
	if ind >= 0 {
		return ind + 1, dropCR(data[0:ind]), nil
	}
	if atEOF {
		return len(data), dropCR(data), nil
	}
	return 0, nil, nil
}

func dropCR(data []byte) []byte {
	if len(data) > 0 && data[len(data)-1] == '\r' {
		return data[:len(data)-1]
	}
	return data
}

func getFloat() float64 {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res1 int64
	for i := 0; i < len(b); i++ {
		if b[i] == '.' {
			b = b[i+1:]
			break
		}
		res1 *= 10
		res1 += int64(b[i]) - 48
		if i == len(b) - 1 {
			b = b[:0]
		}
	}
	var res2 float64
	for i := len(b); i > 0; i-- {
		res2 += float64(b[i-1]) - 48
		res2 /= 10
	}
	if isNeg {
		res1 *= -1
		res2 *= -1
	}
	return float64(res1) + res2
}

func getInt() int {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res int
	for i := 0; i < len(b); i++ {
		res *= 10
		res += int(b[i]) - 48
	}
	if isNeg {
		res *= -1
	}
	return res
}

func getInt64() int64 {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res int64
	for i := 0; i < len(b); i++ {
		res *= 10
		res += int64(b[i]) - 48
	}
	if isNeg {
		res *= -1
	}
	return res
}

func getString() string {
	in.Scan()
	return in.Text()
}

func intToBytes(n int) []byte {
	var res [33]byte
	var isNeg bool
	if n < 0 {
		isNeg = true
		n = -n
	}
	var l int = 33
	for n > 0 {
		l--
		res[l] = byte(n % 10 + 48)
		n /= 10
	}
	if l == 33 {
		l--
		res[l] = byte(48)
	}
	if isNeg {
		l--
		res[l] = byte(45)
	}
	return res[l:]
}

func int64ToBytes(n int64) []byte {
	var res [65]byte
	var isNeg bool
	if n < 0 {
		isNeg = true
		n = -n
	}
	var l int = 65
	for n > 0 {
		l--
		res[l] = byte(n % 10 + 48)
		n /= 10
	}
	if l == 65 {
		l--
		res[l] = byte(48)
	}
	if isNeg {
		l--
		res[l] = byte(45)
	}
	return res[l:]
}

func bsLower(arr []int, n int) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] < n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] >= n {
		return minN
	}
	return maxN
}

func bsLower64(arr []int64, n int64) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] < n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] >= n {
		return minN
	}
	return maxN
}

func bsUpper(arr []int, n int) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] <= n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] > n {
		return minN
	}
	return maxN
}

func bsUpper64(arr []int64, n int64) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] <= n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] > n {
		return minN
	}
	return maxN
}

func max(n1, n2 int) int {
	if n1 > n2 {
		return n1
	}
	return n2
}

func max64(n1, n2 int64) int64 {
	if n1 > n2 {
		return n1
	}
	return n2
}

func min(n1, n2 int) int {
	if n1 < n2 {
		return n1
	}
	return n2
}

func min64(n1, n2 int64) int64 {
	if n1 < n2 {
		return n1
	}
	return n2
}

func yes(res, isUpperCase bool) bool {
	var arr [4]string = [4]string{"No", "Yes", "NO", "YES"}
	var ind int
	if res == true {
		ind = 1
	}
	if isUpperCase == true {
		ind += 2
	}
	out.WriteString(arr[ind])
	out.WriteByte(NL)
	return res
}

package main

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

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

	query := func(l, r int) int {
		fmt.Printf("? %d %d\n", l+1, r+1)
		return readNum(reader) - 1
	}

	res := solve(n, query) + 1

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

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

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

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

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

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

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

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

	return i
}

func solve(n int, query func(int, int) int) int {
	smax := query(0, n-1)
	// if max is between [1...smax-1] or [smax + 1...r]
	if smax == 0 || query(0, smax) != smax {
		return solve1(smax, n, query)
	}

	return solve2(smax, n, query)
}

func solve1(smax int, n int, query func(int, int) int) int {
	// find smallest position after smax, having second maximum != smax
	left, right := smax, n-1

	for right-left > 1 {
		mid := (left + right) / 2
		if query(smax, mid) == smax {
			right = mid
		} else {
			left = mid
		}
	}
	return right
}

func solve2(smax int, n int, query func(int, int) int) int {
	// find largest position before smax, having second max == smax

	left, right := 0, smax

	for right-left > 1 {
		mid := (left + right) / 2
		if query(mid, smax) == smax {
			left = mid
		} else {
			right = mid
		}
	}
	return left
}

package main

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

type pair [2]int

func cachedQuery(m map[pair]int, l, r int) int {
	x, ok := m[pair{l, r}]
	if ok {
		return x
	}
	fmt.Printf("? %d %d\n", l, r)
	scan(&x)
	m[pair{l, r}] = x
	return x
}

func solveC(n int) {
	mem := make(map[pair]int)
	l, r := 1, n
	move := 0

	secondMaxPos := cachedQuery(mem, 1, n)
	if secondMaxPos == 1 {
		l = 1
		r = n
		move = 1
	} else if secondMaxPos == n {
		l = 1
		r = n
		move = -1
	} else {
		pos := cachedQuery(mem, 1, secondMaxPos)
		if pos != secondMaxPos {
			l = secondMaxPos
			r = n
			move = 1
		} else {
			l = 1
			r = secondMaxPos
			move = -1
		}
	}

	//fmt.Println("@", l, r)

	for r-l > 1 {
		m := l + (r-l)/2
		if move == -1 {
			x := cachedQuery(mem, m, secondMaxPos)
			if x == secondMaxPos {
				l = m
			} else {
				r = m
			}
		} else {
			x := cachedQuery(mem, secondMaxPos, m)
			if x == secondMaxPos {
				r = m
			} else {
				l = m
			}
		}

		//fmt.Println("@", l, r)
	}

	if move == -1 {
		fmt.Printf("! %d\n", l)
	} else {
		fmt.Printf("! %d\n", r)
	}

	//fmt.Println(l, r) 1 4 2 5 3
}

func main() {
	//defer writer.Flush()
	//redirectInputToFile(reader, "input.txt")

	T := 1
	// scan(&T)

	for t := 0; t < T; t++ {
		n := 0
		scan(&n)
		solveC(n)
	}
}

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

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

func redirectInputToFile(r *bufio.Reader, fp string) {
	f, err := os.Open(fp)
	if err != nil {
		panic(err)
	}
	r.Reset(f)
}

package main

import (
	. "fmt"
	"os"
)

type (
	input struct{ n int }
	req   struct{ l, r int }
	resp  struct{ v int }
	guess struct{ ans int }
)

// github.com/EndlessCheng/codeforces-go
func run(in input, Q func(req) resp) (gs guess) {
	q := func(l, r int) int {
		if l == r {
			panic(-1)
		}
		return Q(req{l, r}).v
	}
	n := in.n
	ans := 0
	defer func() { gs.ans = ans }()

	p := q(1, n)
	l, r := 1, n+1
	ll, rr := l, r
	for {
		if r-l == 2 {
			ans = l + r - 1 - q(l, r-1)
			return
		}

		if r-l == 3 {
			p, pl, pr := q(l, r-1), q(l, l+1), q(l+1, l+2)
			if pl == pr {
				if p > pl {
					ans = pl - 1
					return
				}
				ans = pl + 1
				return
			}
			if pl == p {
				ans = 2*l + 1 - p
				return
			}
			ans = 2*l + 3 - p
			return
		}

		m := (l + r) >> 1
		if l == ll && r == rr {
			if p < m {
				if pp := q(l, m-1); pp == p {
					r, rr = m, m
				} else {
					l, ll = m, p
				}
			} else {
				if pp := q(m, r-1); pp == p {
					l, ll = m, m
				} else {
					r, rr = m, p+1
				}
			}
		} else if r == rr {
			if pp := q(ll, m-1); pp == p {
				r, rr = m, m
			} else {
				l = m
			}
		} else {
			if pp := q(m, rr-1); pp == p {
				l, ll = m, m
			} else {
				r = m
			}
		}
	}
}

func ioq() {
	in := os.Stdin
	out := os.Stdout

	Q := func(req req) (resp resp) {
		Fprintln(out, "?", req.l, req.r)
		//out.Flush()
		Fscan(in, &resp.v)
		return
	}

	d := input{}
	Fscan(in, &d.n)
	gs := run(d, Q)
	ans := gs.ans
	Fprintln(out, "!", ans)
	//out.Flush()
}

func main() { ioq() }

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

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

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	if n == 2 {
		if s == 1 {
			submit(2)
		} else {
			submit(1)
		}
	}

	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		ans := l
		for l <= r {
			m := (l + r) / 2
			if req(m, s) == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := r
	for l <= r {
		m := (l + r) / 2
		if req(s, m) == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	if n == 2 {
		if s == 1 {
			submit(2)
		} else {
			submit(1)
		}
	}

	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		ans := r
		for l <= r {
			m := (l + r) / 2
			if req(m, s) == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := l
	for l <= r {
		m := (l + r) / 2
		if req(s, m) == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	if n == 2 {
		if s == 1 {
			submit(2)
		} else {
			submit(1)
		}
	}

	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		ans := s
		for l <= r {
			m := (l + r) / 2
			if req(m, s) == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := s
	for l <= r {
		m := (l + r) / 2
		if req(s, m) == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	if n == 2 {
		if s == 1 {
			submit(2)
		} else {
			submit(1)
		}
	}

	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		ans := s
		for l < r {
			m := (l + r) / 2
			if req(m, s) == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := s
	for l < r {
		m := (l + r) / 2
		if req(s, m) == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := s
		for l <= r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
	}

	// highest num in right half
	l := s
	r := n
	ans := s
	for l <= r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		ans := s
		for l <= r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := s
	for l <= r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		ans := s
		for l < r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := s
	for l < r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		ans := int64(-1)
		for l < r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := int64(-1)
	for l < r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		for l < r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit((l+r)/2 + 1)
	}

	// highest num in right half
	l := s + 1
	r := n
	for l < r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit((l+r)/2 - 1)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		for l < r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit((l + r) / 2)
	}

	// highest num in right half
	l := s + 1
	r := n
	for l < r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit((l + r) / 2)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
	os.Exit(0)
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		for l <= r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if l == r || m == l {
				if nxt == s {
					submit(l)
				} else {
					submit(l - 1)
				}
				return
			}
			if nxt == s {
				l = m
			} else {
				r = m - 1
			}
		}
	}

	// highest num in right half
	l := s + 1
	r := n
	for l <= r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if l == r || m == r {
			if nxt == s {
				submit(r)
			} else {
				submit(r + 1)
			}
			return
		}
		if nxt == s {
			r = m
		} else {
			l = m + 1
		}
	}
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		for l <= r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if l == r {
				if nxt == s {
					submit(l)
				} else {
					submit(l - 1)
				}
				return
			}
			if nxt == s {
				l = m
			} else {
				r = m - 1
			}
		}
	}

	// highest num in right half
	l := s + 1
	r := n
	for l <= r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if l == r {
			if nxt == s {
				submit(r)
			} else {
				submit(r + 1)
			}
			return
		}
		if nxt == s {
			r = m
		} else {
			l = m + 1
		}
	}
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		for l <= r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if l == r {
				if nxt == s {
					submit(l)
				} else {
					submit(l - 1)
				}
				return
			}
			if nxt == s {
				l = m + 1
			} else {
				r = m - 1
			}
		}
	}

	// highest num in right half
	l := s + 1
	r := n
	for l <= r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if l == r {
			if nxt == s {
				submit(r)
			} else {
				submit(r + 1)
			}
			return
		}
		if nxt == s {
			r = m - 1
		} else {
			l = m + 1
		}
	}
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		for l <= r {
			if l == r {
				submit(l)
				return
			}
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				l = m + 1
			} else {
				r = m - 1
			}
		}
	}

	// highest num in right half
	l := s + 1
	r := n
	for l <= r {
		if l == r {
			submit(l)
			return
		}
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			r = m - 1
		} else {
			l = m + 1
		}
	}
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		for l < r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit((l + r) / 2)
		return
	}

	// highest num in right half
	l := s + 1
	r := n
	for l < r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit((l + r) / 2)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		ans := int64(-1)
		for l < r {
			if l == r {
				submit(l)
				return
			}
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := int64(-1)
	for l < r {
		if l == r {
			submit(l)
			return
		}
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		ans := int64(-1)
		for l <= r {
			if l == r {
				submit(l)
				return
			}
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := int64(-1)
	for l <= r {
		if l == r {
			submit(l)
			return
		}
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s - 1
		ans := int64(-1)
		for l <= r {
			if l == r {
				submit(l)
				return
			}
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s + 1
	r := n
	ans := int64(-1)
	for l <= r {
		if l == r {
			submit(l)
			return
		}
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l <= r {
			if l == r || r-l == 1 {
				submit(l)
				return
			}
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l <= r {
		if l == r || r-l == 1 {
			submit(l)
			return
		}
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l <= r {
			if l == r {
				submit(l)
				return
			}
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l <= r {
		if l == r {
			submit(l)
			return
		}
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l <= r {
			if l == r {
				submit(ans)
				return
			}
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l <= r {
		if l == r {
			submit(ans)
			return
		}
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l <= r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l <= r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l <= r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l <= r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	for i := 0; i < 100; i++ {
		req(1, n)
	}

	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l <= r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l <= r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	for i := 0; i < 100; i++ {
		req(1, 1)
	}

	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l <= r {
			m := (l + r) / 2
			nxt := req(m, s) // query right side
			if nxt == s {
				ans = m
				l = m
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l <= r {
		m := (l + r) / 2
		nxt := req(s, m) // query left side
		if nxt == s {
			ans = m
			r = m
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l < r {
			m := (l + r) / 2
			nxt := req(m, s)
			if nxt == s {
				ans = m
				l = m
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l < r {
		m := (l + r) / 2
		nxt := req(s, m)
		if nxt == s {
			ans = m
			r = m
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l < r {
			m := (l + r) / 2
			nxt := req(m, s)
			if nxt == s {
				ans = m
				l = m
			} else {
				ans = m - 1
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l < r {
		m := (l + r) / 2
		nxt := req(s, m)
		if nxt == s {
			ans = m
			r = m
		} else {
			ans = m + 1
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l < r {
			m := (l + r) / 2
			nxt := req(m, s)
			if nxt == s {
				ans = m
				l = m + 1
			} else {
				ans = m - 1
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l < r {
		m := (l + r) / 2
		nxt := req(s, m)
		if nxt == s {
			ans = m
			r = m - 1
		} else {
			ans = m + 1
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	s := req(1, n)
	s2 := req(1, s)

	// highest num in left half
	if s == s2 {
		l := int64(1)
		r := s
		ans := int64(-1)
		for l < r {
			m := (l + r) / 2
			nxt := req(m, s)
			if nxt == s {
				ans = m
				l = m + 1
			} else {
				r = m - 1
			}
		}
		submit(ans)
		return
	}

	// highest num in right half
	l := s
	r := n
	ans := int64(-1)
	for l < r {
		m := (l + r) / 2
		nxt := req(s, m)
		if nxt == s {
			ans = m
			r = m - 1
		} else {
			l = m + 1
		}
	}
	submit(ans)
	return
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

func submit(x int64) {
	printf("! %d\n", x)
	writer.Flush()
}

package main

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

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

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

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

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

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

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

func main() {
	n := sint64()
	printf("! %d\n", sol(1, n))
	writer.Flush()
}

func sol(l, r int64) int64 {
	if l == r {
		return l
	}
	m := req(l, r)
	n := req(l, m) // try left
	if n == m {    // go left
		return sol(l, m-1)
	}
	return sol(m+1, r)
}

func req(l, r int64) int64 {
	printf("? %d %d\n", l, r)
	writer.Flush()
	return sint64()
}

package main

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

const (
	MOD int64 = 1e9+7
	NL byte = byte('\n')
	SP byte = byte(' ')
)

var (
	in *bufio.Scanner
	out *bufio.Writer

	n int
	res int
)

func main() {
	initBuffer()
	var t int = 1
	// t = getInt()
	for i := 0; i < t; i++ {
		solve()
	}
	// test()
	out.Flush()
}

func solve() {
	initialize()
	input()
	count()
	output()
}

func initialize() {

}

func input() {
	n = getInt()
}

func count() {
	var i1, i2 int = 1, n
	printIt(i1, i2)
	var x int = getInt()
	if x == 1 {
		i1 = 2
	} else if x == n {
		i2 = n - 1
	} else {
		printIt(1, x)
		if x == getInt() {
			i2 = x - 1
		} else {
			i1 = x + 1
		}
	}
	var k int
	for i1 < i2 {
		k = (i1 + i2) / 2
		if x < i1 {
			printIt(x, k)
			if x == getInt() {
				i2 = k
			} else {
				i1 = k + 1
			}
		} else {
			printIt(k, x)
			if x == getInt() {
				if i1 + 1 == i2 {
					printIt(i2, x)
					if x == getInt() {
						i1++
					} else {
						i2--
					}
				} else {
					i1 = k
				}
			} else {
				i2 = k - 1
			}
		}
	}
	res = i1
}

func printIt(a, b int) {
	out.WriteString("? ")
	out.Write(intToBytes(a))
	out.WriteByte(SP)
	out.Write(intToBytes(b))
	out.WriteByte(NL)
	out.Flush()
}

func output() {
	out.WriteString("! ")
	out.Write(intToBytes(res))
}

func test() {
	fmt.Print()
}

func initBuffer() {
	in = bufio.NewScanner(os.Stdin)
	in.Buffer([]byte{}, 4 * 1024 * 1024)
	in.Split(scanWords)
	out = bufio.NewWriter(os.Stdout)
}

func scanWords(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}
	i := bytes.IndexByte(data, '\n')
	j := bytes.IndexByte(data, ' ')
	ind := min(i, j)
	if ind < 0 {
		ind = max(i, j)
	}
	if ind >= 0 {
		return ind + 1, dropCR(data[0:ind]), nil
	}
	if atEOF {
		return len(data), dropCR(data), nil
	}
	return 0, nil, nil
}

func dropCR(data []byte) []byte {
	if len(data) > 0 && data[len(data)-1] == '\r' {
		return data[:len(data)-1]
	}
	return data
}

func getFloat() float64 {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res1 int64
	for i := 0; i < len(b); i++ {
		if b[i] == '.' {
			b = b[i+1:]
			break
		}
		res1 *= 10
		res1 += int64(b[i]) - 48
		if i == len(b) - 1 {
			b = b[:0]
		}
	}
	var res2 float64
	for i := len(b); i > 0; i-- {
		res2 += float64(b[i-1]) - 48
		res2 /= 10
	}
	if isNeg {
		res1 *= -1
		res2 *= -1
	}
	return float64(res1) + res2
}

func getInt() int {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res int
	for i := 0; i < len(b); i++ {
		res *= 10
		res += int(b[i]) - 48
	}
	if isNeg {
		res *= -1
	}
	return res
}

func getInt64() int64 {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res int64
	for i := 0; i < len(b); i++ {
		res *= 10
		res += int64(b[i]) - 48
	}
	if isNeg {
		res *= -1
	}
	return res
}

func getString() string {
	in.Scan()
	return in.Text()
}

func intToBytes(n int) []byte {
	var res [33]byte
	var isNeg bool
	if n < 0 {
		isNeg = true
		n = -n
	}
	var l int = 33
	for n > 0 {
		l--
		res[l] = byte(n % 10 + 48)
		n /= 10
	}
	if l == 33 {
		l--
		res[l] = byte(48)
	}
	if isNeg {
		l--
		res[l] = byte(45)
	}
	return res[l:]
}

func int64ToBytes(n int64) []byte {
	var res [65]byte
	var isNeg bool
	if n < 0 {
		isNeg = true
		n = -n
	}
	var l int = 65
	for n > 0 {
		l--
		res[l] = byte(n % 10 + 48)
		n /= 10
	}
	if l == 65 {
		l--
		res[l] = byte(48)
	}
	if isNeg {
		l--
		res[l] = byte(45)
	}
	return res[l:]
}

func bsLower(arr []int, n int) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] < n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] >= n {
		return minN
	}
	return maxN
}

func bsLower64(arr []int64, n int64) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] < n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] >= n {
		return minN
	}
	return maxN
}

func bsUpper(arr []int, n int) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] <= n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] > n {
		return minN
	}
	return maxN
}

func bsUpper64(arr []int64, n int64) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] <= n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] > n {
		return minN
	}
	return maxN
}

func max(n1, n2 int) int {
	if n1 > n2 {
		return n1
	}
	return n2
}

func max64(n1, n2 int64) int64 {
	if n1 > n2 {
		return n1
	}
	return n2
}

func min(n1, n2 int) int {
	if n1 < n2 {
		return n1
	}
	return n2
}

func min64(n1, n2 int64) int64 {
	if n1 < n2 {
		return n1
	}
	return n2
}

func yes(res, isUpperCase bool) bool {
	var arr [4]string = [4]string{"No", "Yes", "NO", "YES"}
	var ind int
	if res == true {
		ind = 1
	}
	if isUpperCase == true {
		ind += 2
	}
	out.WriteString(arr[ind])
	out.WriteByte(NL)
	return res
}

package main

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

const (
	MOD int64 = 1e9+7
	NL byte = byte('\n')
	SP byte = byte(' ')
)

var (
	in *bufio.Scanner
	out *bufio.Writer

	n int
	res int
)

func main() {
	initBuffer()
	var t int = 1
	// t = getInt()
	for i := 0; i < t; i++ {
		solve()
	}
	// test()
	out.Flush()
}

func solve() {
	initialize()
	input()
	count()
	output()
}

func initialize() {

}

func input() {
	n = getInt()
}

func count() {
	var i1, i2 int = 1, n
	printIt(i1, i2)
	var x int = getInt()
	if x == 1 {
		i1 = 2
	} else if x == n {
		i2 = n - 1
	} else {
		printIt(1, x)
		if x == getInt() {
			i2 = x - 1
		} else {
			i1 = x + 1
		}
	}
	var k int
	for i1 < i2 {
		k = (i1 + i2) / 2
		if x < k {
			printIt(x, k)
			if x == getInt() {
				i2 = k
			} else {
				i1 = k + 1
			}
		} else {
			printIt(k, x)
			if x == getInt() {
				if i1 + 1 == i2 {
					i1++
				} else {
					i1 = k
				}
			} else {
				i2 = k - 1
			}
		}
	}
	res = i1
}

func printIt(a, b int) {
	out.WriteString("? ")
	out.Write(intToBytes(a))
	out.WriteByte(SP)
	out.Write(intToBytes(b))
	out.WriteByte(NL)
	out.Flush()
}

func output() {
	out.WriteString("! ")
	out.Write(intToBytes(res))
}

func test() {
	fmt.Print()
}

func initBuffer() {
	in = bufio.NewScanner(os.Stdin)
	in.Buffer([]byte{}, 4 * 1024 * 1024)
	in.Split(scanWords)
	out = bufio.NewWriter(os.Stdout)
}

func scanWords(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}
	i := bytes.IndexByte(data, '\n')
	j := bytes.IndexByte(data, ' ')
	ind := min(i, j)
	if ind < 0 {
		ind = max(i, j)
	}
	if ind >= 0 {
		return ind + 1, dropCR(data[0:ind]), nil
	}
	if atEOF {
		return len(data), dropCR(data), nil
	}
	return 0, nil, nil
}

func dropCR(data []byte) []byte {
	if len(data) > 0 && data[len(data)-1] == '\r' {
		return data[:len(data)-1]
	}
	return data
}

func getFloat() float64 {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res1 int64
	for i := 0; i < len(b); i++ {
		if b[i] == '.' {
			b = b[i+1:]
			break
		}
		res1 *= 10
		res1 += int64(b[i]) - 48
		if i == len(b) - 1 {
			b = b[:0]
		}
	}
	var res2 float64
	for i := len(b); i > 0; i-- {
		res2 += float64(b[i-1]) - 48
		res2 /= 10
	}
	if isNeg {
		res1 *= -1
		res2 *= -1
	}
	return float64(res1) + res2
}

func getInt() int {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res int
	for i := 0; i < len(b); i++ {
		res *= 10
		res += int(b[i]) - 48
	}
	if isNeg {
		res *= -1
	}
	return res
}

func getInt64() int64 {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res int64
	for i := 0; i < len(b); i++ {
		res *= 10
		res += int64(b[i]) - 48
	}
	if isNeg {
		res *= -1
	}
	return res
}

func getString() string {
	in.Scan()
	return in.Text()
}

func intToBytes(n int) []byte {
	var res [33]byte
	var isNeg bool
	if n < 0 {
		isNeg = true
		n = -n
	}
	var l int = 33
	for n > 0 {
		l--
		res[l] = byte(n % 10 + 48)
		n /= 10
	}
	if l == 33 {
		l--
		res[l] = byte(48)
	}
	if isNeg {
		l--
		res[l] = byte(45)
	}
	return res[l:]
}

func int64ToBytes(n int64) []byte {
	var res [65]byte
	var isNeg bool
	if n < 0 {
		isNeg = true
		n = -n
	}
	var l int = 65
	for n > 0 {
		l--
		res[l] = byte(n % 10 + 48)
		n /= 10
	}
	if l == 65 {
		l--
		res[l] = byte(48)
	}
	if isNeg {
		l--
		res[l] = byte(45)
	}
	return res[l:]
}

func bsLower(arr []int, n int) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] < n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] >= n {
		return minN
	}
	return maxN
}

func bsLower64(arr []int64, n int64) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] < n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] >= n {
		return minN
	}
	return maxN
}

func bsUpper(arr []int, n int) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] <= n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] > n {
		return minN
	}
	return maxN
}

func bsUpper64(arr []int64, n int64) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] <= n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] > n {
		return minN
	}
	return maxN
}

func max(n1, n2 int) int {
	if n1 > n2 {
		return n1
	}
	return n2
}

func max64(n1, n2 int64) int64 {
	if n1 > n2 {
		return n1
	}
	return n2
}

func min(n1, n2 int) int {
	if n1 < n2 {
		return n1
	}
	return n2
}

func min64(n1, n2 int64) int64 {
	if n1 < n2 {
		return n1
	}
	return n2
}

func yes(res, isUpperCase bool) bool {
	var arr [4]string = [4]string{"No", "Yes", "NO", "YES"}
	var ind int
	if res == true {
		ind = 1
	}
	if isUpperCase == true {
		ind += 2
	}
	out.WriteString(arr[ind])
	out.WriteByte(NL)
	return res
}

package main

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

const (
	MOD int64 = 1e9+7
	NL byte = byte('\n')
	SP byte = byte(' ')
)

var (
	in *bufio.Scanner
	out *bufio.Writer

	n int
	res int
)

func main() {
	initBuffer()
	var t int = 1
	// t = getInt()
	for i := 0; i < t; i++ {
		solve()
	}
	// test()
	out.Flush()
}

func solve() {
	initialize()
	input()
	count()
	output()
}

func initialize() {

}

func input() {
	n = getInt()
}

func count() {
	var i1, i2 int = 1, n
	printIt(i1, i2)
	var x int = getInt()
	if x == 1 {
		i1 = 2
	} else if x == n {
		i2 = n - 1
	} else {
		printIt(1, x)
		if x == getInt() {
			i2 = x - 1
		} else {
			i1 = x + 1
		}
	}
	var k int
	for i1 < i2 {
		k = (i1 + i2) / 2
		if x < k {
			printIt(x, k)
			if x == getInt() {
				i2 = k
			} else {
				i1 = k + 1
			}
		} else {
			printIt(k, x)
			if x == getInt() {
				if i1 + 1 == i2 {
					i2 = k
				} else {
					i1 = k
				}
			} else {
				i2 = k - 1
			}
		}
	}
	res = i1
}

func printIt(a, b int) {
	out.WriteString("? ")
	out.Write(intToBytes(a))
	out.WriteByte(SP)
	out.Write(intToBytes(b))
	out.WriteByte(NL)
	out.Flush()
}

func output() {
	out.WriteString("! ")
	out.Write(intToBytes(res))
}

func test() {
	fmt.Print()
}

func initBuffer() {
	in = bufio.NewScanner(os.Stdin)
	in.Buffer([]byte{}, 4 * 1024 * 1024)
	in.Split(scanWords)
	out = bufio.NewWriter(os.Stdout)
}

func scanWords(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}
	i := bytes.IndexByte(data, '\n')
	j := bytes.IndexByte(data, ' ')
	ind := min(i, j)
	if ind < 0 {
		ind = max(i, j)
	}
	if ind >= 0 {
		return ind + 1, dropCR(data[0:ind]), nil
	}
	if atEOF {
		return len(data), dropCR(data), nil
	}
	return 0, nil, nil
}

func dropCR(data []byte) []byte {
	if len(data) > 0 && data[len(data)-1] == '\r' {
		return data[:len(data)-1]
	}
	return data
}

func getFloat() float64 {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res1 int64
	for i := 0; i < len(b); i++ {
		if b[i] == '.' {
			b = b[i+1:]
			break
		}
		res1 *= 10
		res1 += int64(b[i]) - 48
		if i == len(b) - 1 {
			b = b[:0]
		}
	}
	var res2 float64
	for i := len(b); i > 0; i-- {
		res2 += float64(b[i-1]) - 48
		res2 /= 10
	}
	if isNeg {
		res1 *= -1
		res2 *= -1
	}
	return float64(res1) + res2
}

func getInt() int {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res int
	for i := 0; i < len(b); i++ {
		res *= 10
		res += int(b[i]) - 48
	}
	if isNeg {
		res *= -1
	}
	return res
}

func getInt64() int64 {
	in.Scan()
	b := in.Bytes()
	var isNeg bool
	if b[0] == '-' {
		isNeg = true
		b = b[1:]
	}
	var res int64
	for i := 0; i < len(b); i++ {
		res *= 10
		res += int64(b[i]) - 48
	}
	if isNeg {
		res *= -1
	}
	return res
}

func getString() string {
	in.Scan()
	return in.Text()
}

func intToBytes(n int) []byte {
	var res [33]byte
	var isNeg bool
	if n < 0 {
		isNeg = true
		n = -n
	}
	var l int = 33
	for n > 0 {
		l--
		res[l] = byte(n % 10 + 48)
		n /= 10
	}
	if l == 33 {
		l--
		res[l] = byte(48)
	}
	if isNeg {
		l--
		res[l] = byte(45)
	}
	return res[l:]
}

func int64ToBytes(n int64) []byte {
	var res [65]byte
	var isNeg bool
	if n < 0 {
		isNeg = true
		n = -n
	}
	var l int = 65
	for n > 0 {
		l--
		res[l] = byte(n % 10 + 48)
		n /= 10
	}
	if l == 65 {
		l--
		res[l] = byte(48)
	}
	if isNeg {
		l--
		res[l] = byte(45)
	}
	return res[l:]
}

func bsLower(arr []int, n int) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] < n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] >= n {
		return minN
	}
	return maxN
}

func bsLower64(arr []int64, n int64) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] < n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] >= n {
		return minN
	}
	return maxN
}

func bsUpper(arr []int, n int) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] <= n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] > n {
		return minN
	}
	return maxN
}

func bsUpper64(arr []int64, n int64) int {
	var minN, midN, maxN int
	maxN = len(arr)
	for maxN - 1 > minN {
		midN = (minN + maxN) / 2
		if arr[midN] <= n {
			minN = midN
		} else {
			maxN = midN
		}
	}
	if arr[minN] > n {
		return minN
	}
	return maxN
}

func max(n1, n2 int) int {
	if n1 > n2 {
		return n1
	}
	return n2
}

func max64(n1, n2 int64) int64 {
	if n1 > n2 {
		return n1
	}
	return n2
}

func min(n1, n2 int) int {
	if n1 < n2 {
		return n1
	}
	return n2
}

func min64(n1, n2 int64) int64 {
	if n1 < n2 {
		return n1
	}
	return n2
}

func yes(res, isUpperCase bool) bool {
	var arr [4]string = [4]string{"No", "Yes", "NO", "YES"}
	var ind int
	if res == true {
		ind = 1
	}
	if isUpperCase == true {
		ind += 2
	}
	out.WriteString(arr[ind])
	out.WriteByte(NL)
	return res
}

package main

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

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

	query := func(l, r int) int {
		fmt.Printf("? %d %d\n", l-1, r-1)
		return readNum(reader) - 1
	}

	res := solve(n, query) + 1

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

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

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

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

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

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

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

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

	return i
}

func solve(n int, query func(int, int) int) int {
	smax := query(0, n-1)
	// if max is between [1...smax-1] or [smax + 1...r]
	if smax == 0 || query(0, smax) != smax {
		return solve1(smax, n, query)
	}

	return solve2(smax, n, query)
}

func solve1(smax int, n int, query func(int, int) int) int {
	// find smallest position after smax, having second maximum != smax
	left, right := smax, n-1

	for right-left > 1 {
		mid := (left + right) / 2
		if query(smax, mid) == smax {
			right = mid
		} else {
			left = mid
		}
	}
	return right
}

func solve2(smax int, n int, query func(int, int) int) int {
	// find largest position before smax, having second max == smax

	left, right := 0, smax

	for right-left > 1 {
		mid := (left + right) / 2
		if query(mid, smax) == smax {
			left = mid
		} else {
			right = mid
		}
	}
	return left
}

package main

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

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

	query := func(l, r int) int {
		fmt.Printf("? %d %d\n", l, r)
		return readNum(reader)
	}

	res := solve(n, query)

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

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

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

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

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

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

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

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

	return i
}

func solve(n int, query func(int, int) int) int {
	smax := query(1, n)
	// if max is between [1...smax-1] or [smax + 1...r]
	if smax == 1 {
		return solve1(smax, n, query)
	}

	if smax == n {
		return solve2(smax, n, query)
	}

	x := query(1, smax)

	if x == smax {
		return solve2(smax, n, query)
	}
	return solve1(smax, n, query)
}

func solve1(smax int, n int, query func(int, int) int) int {
	// find smallest position after smax, having second maximum != smax
	left, right := smax+1, n

	for right-left > 1 {
		mid := (left + right) / 2
		if query(smax, mid) == smax {
			right = mid
		} else {
			left = mid
		}
	}
	return right
}

func solve2(smax int, n int, query func(int, int) int) int {
	// find largest position before smax, having second max == smax

	left, right := 1, smax+1

	for right-left > 1 {
		mid := (left + right) / 2
		if query(mid, smax) == smax {
			left = mid
		} else {
			right = mid
		}
	}
	return left
}

package main

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

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

	query := func(l, r int) int {
		fmt.Printf("? %d %d\n", l, r)
		return readNum(reader)
	}

	res := solve(n, query)

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

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

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

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

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

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

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

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

	return i
}

func solve(n int, query func(int, int) int) int {
	smax := query(1, n)
	// if max is between [1...smax-1] or [smax + 1...r]
	if smax == 1 {
		return solve1(smax, n, query)
	}

	if smax == n {
		return solve2(smax, n, query)
	}

	x := query(1, smax)

	if x == smax {
		return solve2(smax, n, query)
	}
	return solve1(smax, n, query)
}

func solve1(smax int, n int, query func(int, int) int) int {
	// find smallest position after smax, having second maximum != smax
	left, right := smax+1, n+1

	for left < right {
		mid := (left + right) / 2
		x := query(mid, n)
		if x == smax {
			left = mid + 1
		} else {
			right = mid
		}
	}
	return right - 1
}

func solve2(smax int, n int, query func(int, int) int) int {
	// find largest position before smax, having second max == smax

	left, right := 1, smax

	for left < right {
		mid := (left + right) / 2
		x := query(mid, smax)
		if x == smax {
			left = mid + 1
		} else {
			right = mid
		}
	}
	return right - 1
}

package main

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

type pair [2]int

func cachedQuery(m map[pair]int, l, r int) int {
	x, ok := m[pair{l, r}]
	if ok {
		return x
	}
	fmt.Printf("? %d %d\n", l, r)
	scan(&x)
	m[pair{l, r}] = x
	return x
}

func solveC(n int) {
	mem := make(map[pair]int)
	l, r := 1, n
	move := 0

	secondMaxPos := cachedQuery(mem, 1, n)
	pos := cachedQuery(mem, 1, secondMaxPos)

	if secondMaxPos == 1 {
		l = 1
		r = n
		move = 1
	} else if secondMaxPos == n {
		l = 1
		r = n
		move = -1
	} else {
		if pos != secondMaxPos {
			l = secondMaxPos
			r = n
			move = 1
		} else {
			l = 1
			r = secondMaxPos
			move = -1
		}
	}
	//fmt.Println("@", l, r)

	for r-l > 1 {
		m := l + (r-l)/2
		if move == -1 {
			x := cachedQuery(mem, m, secondMaxPos)
			if x == secondMaxPos {
				l = m
			} else {
				r = m
			}
		} else {
			x := cachedQuery(mem, secondMaxPos, m)
			if x == secondMaxPos {
				r = m
			} else {
				l = m
			}
		}

		//fmt.Println("@", l, r)
	}

	if move == -1 {
		pos = cachedQuery(mem, l, secondMaxPos)
		if pos == secondMaxPos {
			fmt.Printf("! %d\n", l)
		} else {
			fmt.Printf("! %d\n", r)
		}
	} else {
		pos = cachedQuery(mem, secondMaxPos, r)
		if pos == secondMaxPos {
			fmt.Printf("! %d\n", r)
		} else {
			fmt.Printf("! %d\n", l)
		}
	}

	//fmt.Println(l, r) 1 4 2 5 3
}

func main() {
	//defer writer.Flush()
	//redirectInputToFile(reader, "input.txt")

	T := 1
	// scan(&T)

	for t := 0; t < T; t++ {
		n := 0
		scan(&n)
		solveC(n)
	}
}

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

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

func redirectInputToFile(r *bufio.Reader, fp string) {
	f, err := os.Open(fp)
	if err != nil {
		panic(err)
	}
	r.Reset(f)
}

package main

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

type pair [2]int

func solveC(n int) {
	mem := make(map[pair]int)

	l, r := 1, n
	move := 0
	secondMaxPos := -1
	pos := -1

	fmt.Printf("? %d %d\n", 1, n)
	scan(&secondMaxPos)
	mem[pair{1, n}] = secondMaxPos

	fmt.Printf("? %d %d\n", 1, secondMaxPos)
	scan(&pos)
	mem[pair{1, secondMaxPos}] = pos

	if secondMaxPos == 1 {
		l = 1
		r = n
		move = 1
	} else if secondMaxPos == n {
		l = 1
		r = n
		move = -1
	} else {
		if pos != secondMaxPos {
			l = secondMaxPos
			r = n
			move = 1
		} else {
			l = 1
			r = secondMaxPos
			move = -1
		}
	}
	//fmt.Println("@", l, r)

	for r-l > 1 {
		m := l + (r-l)/2

		if move == -1 {
			x, ok := mem[pair{m, secondMaxPos}]
			if !ok {
				fmt.Printf("? %d %d\n", m, secondMaxPos)
				scan(&pos)
				mem[pair{m, secondMaxPos}] = pos
			} else {
				pos = x
			}
			if pos == secondMaxPos {
				l = m
			} else {
				r = m
			}
		} else {
			x, ok := mem[pair{secondMaxPos, m}]
			if !ok {
				fmt.Printf("? %d %d\n", secondMaxPos, m)
				scan(&pos)
				mem[pair{secondMaxPos, m}] = pos
			} else {
				pos = x
			}

			if pos == secondMaxPos {
				r = m
			} else {
				l = m
			}
		}

		//fmt.Println("@", l, r)
	}

	if move == -1 {
		x, ok := mem[pair{l, secondMaxPos}]
		if ok {
			pos = x
		} else {
			fmt.Printf("? %d %d\n", l, secondMaxPos)
			scan(&pos)
		}

		if pos == secondMaxPos {
			fmt.Printf("! %d\n", l)
		} else {
			fmt.Printf("! %d\n", r)
		}
	} else {
		x, ok := mem[pair{secondMaxPos, r}]
		if ok {
			pos = x
		} else {
			fmt.Printf("? %d %d\n", secondMaxPos, r)
			scan(&pos)
		}
		if pos == secondMaxPos {
			fmt.Printf("! %d\n", r)
		} else {
			fmt.Printf("! %d\n", l)
		}
	}

	//fmt.Println(l, r)
}

func main() {
	//defer writer.Flush()
	//redirectInputToFile(reader, "input.txt")

	T := 1
	// scan(&T)

	for t := 0; t < T; t++ {
		n := 0
		scan(&n)
		solveC(n)
	}
}

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

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

func redirectInputToFile(r *bufio.Reader, fp string) {
	f, err := os.Open(fp)
	if err != nil {
		panic(err)
	}
	r.Reset(f)
}

package main

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

type pair [2]int

func solveC(n int) {
	mem := make(map[pair]int)

	l, r := 1, n
	move := 0
	secondMaxPos := -1
	pos := -1

	fmt.Printf("? %d %d\n", 1, n)
	scan(&secondMaxPos)
	mem[pair{1, n}] = secondMaxPos

	fmt.Printf("? %d %d\n", 1, secondMaxPos)
	scan(&pos)
	mem[pair{1, secondMaxPos}] = pos

	if pos != secondMaxPos {
		l = secondMaxPos
		r = n
		move = 1
	} else {
		l = 1
		r = secondMaxPos
		move = -1
	}
	//fmt.Println("@", l, r)

	for r-l > 1 {
		m := l + (r-l)/2

		if move == -1 {
			x, ok := mem[pair{m, secondMaxPos}]
			if !ok {
				fmt.Printf("? %d %d\n", m, secondMaxPos)
				scan(&pos)
				mem[pair{m, secondMaxPos}] = pos
			} else {
				pos = x
			}
			if pos == secondMaxPos {
				l = m
			} else {
				r = m
			}
		} else {
			x, ok := mem[pair{secondMaxPos, m}]
			if !ok {
				fmt.Printf("? %d %d\n", secondMaxPos, m)
				scan(&pos)
				mem[pair{secondMaxPos, m}] = pos
			} else {
				pos = x
			}

			if pos == secondMaxPos {
				r = m
			} else {
				l = m
			}
		}

		//fmt.Println("@", l, r)
	}

	if move == -1 {
		x, ok := mem[pair{l, secondMaxPos}]
		if ok {
			pos = x
		} else {
			fmt.Printf("? %d %d\n", l, secondMaxPos)
			scan(&pos)
		}

		if pos == secondMaxPos {
			fmt.Printf("! %d\n", l)
		} else {
			fmt.Printf("! %d\n", r)
		}
	} else {
		x, ok := mem[pair{secondMaxPos, r}]
		if ok {
			pos = x
		} else {
			fmt.Printf("? %d %d\n", secondMaxPos, r)
			scan(&pos)
		}
		if pos == secondMaxPos {
			fmt.Printf("! %d\n", r)
		} else {
			fmt.Printf("! %d\n", l)
		}
	}

	//fmt.Println(l, r)
}

func main() {
	//defer writer.Flush()
	//redirectInputToFile(reader, "input.txt")

	T := 1
	// scan(&T)

	for t := 0; t < T; t++ {
		n := 0
		scan(&n)
		solveC(n)
	}
}

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

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

func redirectInputToFile(r *bufio.Reader, fp string) {
	f, err := os.Open(fp)
	if err != nil {
		panic(err)
	}
	r.Reset(f)
}

package main

import (
	. "fmt"
	"os"
)

type (
	input struct{ n int }
	req   struct{ l, r int }
	resp  struct{ v int }
	guess struct{ ans int }
)

// github.com/EndlessCheng/codeforces-go
func run(in input, Q func(req) resp) (gs guess) {
	q := func(l, r int) int {
		if l == r {
			panic(-1)
		}
		return Q(req{l, r}).v
	}
	n := in.n
	ans := 0
	defer func() { gs.ans = ans }()

	p := q(1, n)
	l, r := 1, n+1
	ll, rr := l, r
	for {
		if r-l == 2 {
			ans = l + r - 1 - q(l, r-1)
			return
		}

		if r-l == 3 {
			p, pl, pr := q(l, r-1), q(l, l+1), q(l+1, l+2)
			if pl == pr {
				if p > pl {
					ans = pl - 1
					return
				}
				ans = pl + 1
				return
			}
			if pl == p {
				ans = 2*l + 1 - p
				return
			}
			ans = 2*l + 3 - p
			return
		}

		m := (l + r) >> 1
		if l == ll && r == rr {
			if p < m {
				if pp := q(l, m-1); pp == p {
					r, rr = m, m
				} else {
					p = max(p, pp)
					l, ll = m, p
				}
			} else {
				if pp := q(m, r-1); pp == p {
					l, ll = m, m
				} else {
					p = min(p, pp)
					r, rr = m, p+1
				}
			}
		} else if r == rr {
			if pp := q(ll, m-1); pp == p {
				r, rr = m, m
			} else {
				p = pp
				l, ll = m, m
			}
		} else {
			if pp := q(m, rr-1); pp == p {
				l, ll = m, m
			} else {
				p = pp
				r, rr = m, m
			}
		}
	}
}

func ioq() {
	in := os.Stdin
	out := os.Stdout

	Q := func(req req) (resp resp) {
		Fprintln(out, "?", req.l, req.r)
		//out.Flush()
		Fscan(in, &resp.v)
		return
	}

	d := input{}
	Fscan(in, &d.n)
	gs := run(d, Q)
	ans := gs.ans
	Fprintln(out, "!", ans)
	//out.Flush()
}

func main() { ioq() }
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

package main

import (
	. "fmt"
	"os"
)

type (
	input struct{ n int }
	req   struct{ l, r int }
	resp  struct{ v int }
	guess struct{ ans int }
)

// github.com/EndlessCheng/codeforces-go
func run(in input, Q func(req) resp) (gs guess) {
	q := func(l, r int) int {
		if l == r {
			panic(-1)
		}
		return Q(req{l, r}).v
	}
	n := in.n
	ans := 0
	defer func() { gs.ans = ans }()

	p := q(1, n)
	//
	//if n == 2 {
	//	ans = 3 - p
	//	return
	//}

	l, r := 1, n+1
	ll, rr := l, r
	for {
		if r-l == 2 {
			ans = l + r - 1 - q(l, r-1)
			return
		}

		if r-l == 3 {
			p, pl, pr := q(l, r-1), q(l, l+1), q(l+1, l+2)
			if pl == pr {
				if p > pl {
					ans = pl - 1
					return
				}
				ans = pl + 1
				return
			}
			if pl == p {
				ans = 2*l + 1 - p
				return
			}
			ans = 2*l + 3 - p
			return
		}

		//p := q(l, r-1)

		m := (l + r) >> 1
		if l == ll {
			var pp int
			if rr == r {
				pp = q(l, m-1)
			} else {
				pp = q(l, rr-1)
			}
			if pp == p {
				rr = m
				r = m
			} else {
				ll = max(p, pp)
				p = pp
				l = m
			}
		} else {
			var pp int
			if ll == l {
				pp = q(m, r-1)
			} else {
				pp = q(ll, r-1)
			}
			if pp == p {
				ll = m
				l = m
			} else {
				rr = min(p, pp) + 1
				r = m
			}
		}
	}
}

func ioq() {
	in := os.Stdin
	out := os.Stdout

	Q := func(req req) (resp resp) {
		Fprintln(out, "?", req.l, req.r)
		//out.Flush()
		Fscan(in, &resp.v)
		return
	}

	d := input{}
	Fscan(in, &d.n)
	gs := run(d, Q)
	ans := gs.ans
	Fprintln(out, "!", ans)
	//out.Flush()
}

func main() { ioq() }
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}