package main

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

type Io struct {
	reader    *bufio.Reader
	writer    *bufio.Writer
	tokens    []string
	nextToken int
}

func NewIo() *Io {
	return &Io{
		reader: bufio.NewReader(os.Stdin),
		writer: bufio.NewWriter(os.Stdout),
	}
}

func (io *Io) Flush() {
	err := io.writer.Flush()
	if err != nil {
		panic(err)
	}
}

func (io *Io) NextLine() string {
	var buffer []byte
	for {
		line, isPrefix, err := io.reader.ReadLine()
		if err != nil {
			panic(err)
		}
		buffer = append(buffer, line...)
		if !isPrefix {
			break
		}
	}
	return string(buffer)
}

func (io *Io) Next() string {
	for io.nextToken >= len(io.tokens) {
		line := io.NextLine()
		io.tokens = strings.Fields(line)
		io.nextToken = 0
	}
	r := io.tokens[io.nextToken]
	io.nextToken++
	return r
}

func (io *Io) NextInt() int {
	i, err := strconv.Atoi(io.Next())
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) NextLong() int64 {
	i, err := strconv.ParseInt(io.Next(), 10, 64)
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) NextDouble() float64 {
	i, err := strconv.ParseFloat(io.Next(), 64)
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) PrintLn(a ...interface{}) {
	fmt.Fprintln(io.writer, a...)
}

func (io *Io) Printf(format string, a ...interface{}) {
	fmt.Fprintf(io.writer, format, a...)
}

func (io *Io) PrintIntLn(a []int) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.PrintLn(b...)
}

func (io *Io) PrintStringLn(a []string) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.PrintLn(b...)
}

func Log(name string, value interface{}) {
	fmt.Fprintf(os.Stderr, "%s=%+v\n", name, value)
}

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

const MOD = 1000000007

var (
	G [][]int
	dp [][]int
)

func solve(n, k int) int {
	if k == 1 {
		return 1
	}
	if dp[n][k] != -1 {
		return dp[n][k]
	}
	dp[n][k] = solve(n, k - 1)
	for _, u := range G[n] {
		dp[n][k] += solve(u, k - 1)
		dp[n][k] %= MOD
	}
	return dp[n][k]
}

func main() {
	io := NewIo()
	defer io.Flush()
	N := io.NextInt()
	K := io.NextInt()
	G = make([][]int, N + 1)
	outdeg := make([]int, N + 1)
	for i := 1; i <= N; i++ {
		for j := 1; j <= i - 1; j++ {
			if i % j == 0 {
				G[i] = append(G[i], j)
				outdeg[i]++
			}
		}
	}
	dp = make([][]int, N + 1)
	for i := 1; i <= N; i++ {
		dp[i] = make([]int, K + 1)
		for j := 0; j <= K; j++ {
			dp[i][j] = -1
		}
	}
	ans := 0
	for i := 1; i <= N; i++ {
		ans += solve(i, K)
		ans %= MOD
		//for k := 1; k <= K; k++ {
		//	fmt.Fprintf(os.Stderr, "solve(%v,%v)=%v\n", i, k, solve(i, k))
		//}
	}
	io.PrintLn(ans)
}


package main
import (
	"fmt"
)
func main() {
	var ans,mod,n,k,i,j,x int64
	mod=1000000007
	var a[2005][2005]int64
	fmt.Scan(&n,&k)
	for i=1;i<=n;i++ {
		a[1][i]=1
	}
	for i=1;i<k;i++ {
		for j=1;j<=n;j++ {
			for x=j;x<=n;x+=j {
				a[i+1][x]+=a[i][j]
				if a[i+1][x]>=mod{
					a[i+1][x]-=mod
				}
			}
		}
	}
	for i=1;i<=n;i++ {
		ans+=a[k][i]
		if ans>=mod {
			ans-=mod
		}
	}
	fmt.Println(ans)
}


// 70A
package main

import (
	"fmt"
)

func main() {
	var m int
	e := 1
	fmt.Scan(&m)
	for j := 1; j <= m-1; j++ {
		e = (3 * e) % 1000003
	}
	fmt.Print(e)
}


//70A
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
)

func main() {
	var nn, a int64
	a=1
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	r.Scan()
	nn, _ = strconv.ParseInt(r.Text(), 0, 64)
	if nn==1 {
		a=1
	} else {
		for i:=2; int64(i)<=nn; i++ {
			a=(a*3)%1000003
		}
	}
	fmt.Println(a)
}


package main

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

func inc(x int64) int64 {
	return x + 1
}
func dec(x int64) int64 {
	return x - 1
}
func isOdd(x int64) bool {
	return x%1 == 1
}

func isNotOdd(x int64) bool {
	return !isOdd(x)
}

func readInt(scanner *bufio.Scanner) int64 {
	scanner.Scan()
	raw := scanner.Text()
	result, _ := strconv.ParseInt(strings.Trim(raw, " \n\r"), 10, 64)
	return result
}
func getWithCalc(x int64, cond func(int64) bool, f func(int64) int64) int64 {
	if cond(x) {
		return f(x)
	}
	return x
}
func check(x1, y1, x2, y2 int64) int64 {

	a1 := 1 + (getWithCalc(x2, isOdd, dec)-getWithCalc(x1, isOdd, inc))/2
	b1 := 1 + (getWithCalc(y2, isOdd, dec)-getWithCalc(y1, isOdd, inc))/2

	a2 := 1 + (getWithCalc(x2, isNotOdd, dec)-getWithCalc(x1, isNotOdd, inc))/2
	b2 := 1 + (getWithCalc(y2, isNotOdd, dec)-getWithCalc(y1, isNotOdd, inc))/2

	return a1*b1 + a2*b2
}
func solve(in io.Reader, out io.Writer) {
	reader := bufio.NewScanner(in)
	reader.Split(bufio.ScanWords)

	fmt.Fprintln(out, check(readInt(reader), readInt(reader), readInt(reader), readInt(reader)))
}

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


package main

import "fmt"

func main() {
	var x1, y1, x2, y2 int64
	fmt.Scanf("%d %d %d %d", &x1, &y1, &x2, &y2)

	var dx, dy, num_prim_cols, num_sec_cols, len_prim_cols, len_sec_cols int64
	dx = x2 - x1
	dy = y2 - y1
	num_prim_cols = dx / 2 + 1 //dx guaranteed to be divisible by 2
	num_sec_cols = num_prim_cols - 1
	len_prim_cols = dy / 2 + 1
	len_sec_cols = 0
//	fmt.Printf("dx=\t%d\ndy=\t%d\nprim_cols=\t%d\nsec_cols=\t%d\n", dx, dy, num_prim_cols, num_sec_cols)

	if ( dy % 2 == 0) {
		len_sec_cols = dy / 2
	} else {
		len_sec_cols = dy / 2 + 1
	}
//	fmt.Printf("\nlen_prim_cols=\t%d\nlen_sec_cols=\t%d\n", len_prim_cols, len_sec_cols)

	fmt.Println(num_prim_cols * len_prim_cols + num_sec_cols * len_sec_cols)
}


package main

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

var scanner *bufio.Scanner

func getI() int64 {
  scanner.Scan()
  x, _ := strconv.ParseInt(scanner.Text(), 10, 64)
  return x
}
func getF() float64 {
  scanner.Scan()
  x, _ := strconv.ParseFloat(scanner.Text(), 64)
  return x
}
func getS() string {
  scanner.Scan()
  return scanner.Text()
}

func toTernaryDigits(x int) []int {
  digits := []int{}
  if x == 0 {
    digits = append(digits, 0)
  }
  for x != 0 {
    digits = append(digits, x%3)
    x /= 3
  }
  return digits
}
func displayDigits(digits []int) {
  for i := len(digits)-1; i >= 0; i-- {
    fmt.Printf("%d", digits[i])
  }
  fmt.Printf("\n")
}

func main() {
  scanner = bufio.NewScanner(os.Stdin)
  scanner.Split(bufio.ScanWords)
  writer := bufio.NewWriter(os.Stdout)
  defer writer.Flush()

  a, c := int(getI()), int(getI())
  as, cs := toTernaryDigits(a), toTernaryDigits(c)
  for len(as) < len(cs) {
    as = append(as, 0)
  }
  for len(cs) < len(as) {
    cs = append(cs, 0)
  }
  n := len(as)
  bs := make([]int, n)
  for i := 0; i < n; i++ {
    bs[i] = (cs[i] + 3 - as[i]) % 3
  }
  b := 0
  for i := n-1; i >= 0; i-- {
    b = 3*b + bs[i]
  }
  writer.WriteString(fmt.Sprintf("%d\n", b))
}


// 136B-mic_rizal
package main

import (
    "fmt"
)

func main() {
    var a, c, b, d, l, i int64
    fmt.Scan(&a, &c)
    var k []int64
    for a != int64(0) || c != int64(0) {
        b = a % 3
        a = a / 3
        d = c % 3
        c = c / 3
        if d-b < int64(0) {
            k = append(k, 3-b+d)
            l++
        } else {
            k = append(k, d-b)
            l++
        }
    }
    ans := int64(0)
    cur := int64(1)
    for i = 0; i < l; i++ {
        ans = ans + cur*k[i]
        cur *= 3
    }
    fmt.Println(ans)
}


package main

import "fmt"

func main() {
    var a,b,c int
    fmt.Scan(&a,&c)
    for i := 1; (a > 0) || (c > 0); i *= 3 {
        da, dc := a%3, c%3
        if dc < da { dc += 3 }
        b += (i*(dc-da))
        a /= 3
        c /= 3
    }
    fmt.Println(b)
}


package main

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

var (
	DistanceStepsMap []int
)

func readInt(in *bufio.Reader) int {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.Atoi(nStr)

	return n
}

func readInt64(in *bufio.Reader) uint64 {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.ParseUint(nStr, 10, 64)

	return n
}

func readLineNumbs(in *bufio.Reader) []string {
	line, _ := in.ReadString('\n')
	line = strings.ReplaceAll(line, "\r", "")
	line = strings.ReplaceAll(line, "\n", "")
	numbs := strings.Split(line, " ")

	return numbs
}

func readArrInt(in *bufio.Reader) []int {
	numbs := readLineNumbs(in)
	arr := make([]int, len(numbs))
	for i, n := range numbs {
		val, _ := strconv.Atoi(n)
		arr[i] = val
	}

	return arr
}

func readArrInt64(in *bufio.Reader) []int64 {
	numbs := readLineNumbs(in)
	arr := make([]int64, len(numbs))
	for i, n := range numbs {
		val, _ := strconv.ParseInt(n, 10, 64)
		arr[i] = val
	}

	return arr
}

func readString(in *bufio.Reader) string {
	line, _ := in.ReadString('\n')
	line = strings.ReplaceAll(line, "\r", "")
	line = strings.ReplaceAll(line, "\n", "")

	return line
}

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

	return b
}

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

	return b
}

func StringToRuneSlice(s string) []rune {
	var r []rune
	for _, runeValue := range s {
		r = append(r, runeValue)
	}

	return r
}

func SwapInt(a *int, b *int) {
	t := *a
	*a = *b
	*b = t
}

// search for theseus

var (
	SearchWord = "theseus"

	FindFlag = false
)

func solve(visit [][]bool, labyrinth []string, r int, c int, ind int) {
	if FindFlag {
		return
	}

	l := len(labyrinth)
	if r >= l  || r < 0{
		return
	}

	if c >= l || c < 0{
		return
	}

	if visit[r][c] {
		return
	}

	//char := labyrinth[r][c]
	//for i := 0; i < len(SearchWord); i++ {
	//	searchChar := SearchWord[i]
	//
	//	if ind == i {
	//		if char == searchChar {
	//			visit[r][c] = true
	//
	//			if i == len(SearchWord) - 1 {
	//				FindFlag = true
	//
	//				return
	//			}
	//
	//			solve(visit, labyrinth, r + 1, c, ind + 1)
	//			//solve(visit, labyrinth, r - 1, c, ind + 1)
	//			solve(visit, labyrinth, r, c + 1, ind + 1)
	//			//solve(visit, labyrinth, r, c - 1, ind + 1)
	//			//solve(visit, labyrinth, r - 1, c + 1, ind + 1)
	//			//solve(visit, labyrinth, r - 1, c - 1, ind + 1)
	//			solve(visit, labyrinth, r + 1, c + 1, ind + 1)
	//			//solve(visit, labyrinth, r + 1, c - 1, ind + 1)
	//		}
	//	}
	//}

	wl := len(SearchWord)

	var w string
	if l - r > wl {
		w = ""
		for i := 0; i < wl; i++ {
			w += string(labyrinth[r + i][c])
		}

		if w == SearchWord {
			FindFlag = true

			return
		}
	}

	if l - c > wl {
		w = ""
		for i := 0; i < wl; i++ {
			w += string(labyrinth[r][c + i])
		}

		if w == SearchWord {
			FindFlag = true

			return
		}
	}

	if l - r > wl && l - c > wl {
		w = ""
		for i := 0; i < wl; i++ {
			w += string(labyrinth[r + i][c + i])
		}

		if w == SearchWord {
			FindFlag = true

			return
		}
	}
}

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

	l := readInt(in)
	//tc := 1

	//solve()

	maze := make([]string, l)
	for i := 0; i < l; i++ {
		maze[i] = readString(in)
	}

	visit := make([][]bool, l)
	for i := 0; i < l; i++ {
		visit[i] = make([]bool, l)
		for j := 0; j < l; j++ {
			visit[i][j] = false
		}
	}

	for i := 0; i < l; i++ {
		for j := 0; j < l; j++ {
			if FindFlag {
				break
			}

			if maze[i][j] == SearchWord[0] {
				solve(visit, maze, i, j, 0)
			}

			for i := 0; i < l; i++ {
				visit[i] = make([]bool, l)
				for j := 0; j < l; j++ {
					visit[i][j] = false
				}
			}
		}
	}

	if FindFlag {
		fmt.Println("YES")

		return
	}

	fmt.Println("NO")

	//for i := 0; i < tc; i++ {
	//	n := readInt(in)
	//	_ = readArrInt(in)
	//	fmt.Println("N: ", n)
	//	fmt.Println("DONE TC: ", i+1)
	//}
}


package main

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

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

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

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

	word := "theseus"

	var f bool
Loop:
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			if arr[i][j] != 't' {
				continue
			}

			// check horizontal
			if j+7 <= n && arr[i][j:j+7] == word {
				f = true
				break Loop
			}

			// check vertical
			if i+7 < n {
				var buf bytes.Buffer
				for k := 0; k < 7; k++ {
					buf.WriteByte(arr[i+k][j])
				}

				if buf.String() == word {
					f = true
					break Loop
				}
			}

			// check diagonal
			if i+7 < n && j+7 < n {
				var buf bytes.Buffer
				for k := 0; k < 7; k++ {
					buf.WriteByte(arr[i+k][j+k])
				}

				if buf.String() == word {
					f = true
					break Loop
				}
			}
		}
	}

	if f {
		fmt.Fprintln(out, "YES")
	} else {
		fmt.Fprintln(out, "NO")
	}
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var n, k float64
	fmt.Scanf("%f %f\n", &n, &k)
	a := 1.0
	b := 2*n + 3
	c := n*n + n - 2*k

	// fmt.Printf("a = %f, b = %f, c = %f\n", a, b, c)

	ans := (b - math.Sqrt(b*b-4*a*c)) / 2
	// fmt.Printf("%f\n", ans)
	fmt.Printf("%d\n", int(math.Round(ans)))
}


package main

import (
    "fmt"
)

func main() {
    var n, k int64
    fmt.Scan(&n, &k)
    var x, y int64 = 1, n
    for y - x > 1 {
        var p int64 = (x + y) / 2
        if p * (p + 1) / 2 - (n - p) >= k {
            y = p
        } else {
            x = p
        }
    }
    fmt.Println(n - y)
}


package main

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

func main() {
	var n, k, res, index int
	// var a, b, c string

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

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

	for i := 1; i <= n; i++ {
		index++
		res += index
		if res-(n-i) == k {
			fmt.Println(n - i)
			break
		}
	}

}


package main

import "fmt"

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

	out := ""

	for run := len(in) > 0; run; run = len(in) > 0 {
		if len(in)%2 == 0 {
			out = string(in[len(in)-1]) + out
			in = in[0 : len(in)-1]
		} else {
			out = string(in[0]) + out
			in = in[1:len(in)]
		}
	}

	fmt.Println(out)
}


package main

import (
	"fmt"
	// "sort"
	// "strings"

)

func main() {

	var cipher string
	fmt.Scan(&cipher)

	var result []byte
	for len(cipher) > 0 {
		var length uint = uint(len(cipher))

		if len(cipher) % 2 == 0 {
			 result = append(result, cipher[length - 1])

			 cipher = cipher[:length - 1]
		} else {
			result = append(result, cipher[0])
			cipher = cipher[1:]
		}
	}

	for _, letter := range result {
		defer fmt.Printf("%s", string(letter))
	}

}


package main

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

func main() {
	io := newIO()
	defer io.out.Flush()

	s := io.nextString()
	var position int
	if len(s) % 2 == 0{
		position = 1
	} else {
		position = 0
	}

	var sb strings.Builder
	first, last := 0, len(s) - 1
	for i := 0; i < len(s); i++ {
		if position == 0 {
			sb.WriteString(s[first:first+1])
			first++
		} else {
			sb.WriteString(s[last:last+1])
			last--
		}
		position ^= 1
	}
	s = sb.String()
	io.print(reverse(s) + "\n")
}

type stack []int

func reverse (s string) string {
	sb := strings.Builder{}
	for i := len(s) - 1; i >= 0; i--{
		sb.WriteString(s[i:i+1])
	}
	return sb.String()
}

func (s stack) Push(v int) stack {
	return append(s, v)
}

func (s stack) Pop() (stack, int, bool) {
	l := len(s)
	if l == 0 {return s, 0, false}
	return s[:l-1], s[l-1], true
}

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

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

type io struct {
	inp *bufio.Scanner
	out *bufio.Writer
}

func newIO() io {
	sc := io{
		inp: bufio.NewScanner(os.Stdin),
		out: bufio.NewWriter(os.Stdout),
	}
	sc.inp.Split(bufio.ScanWords)
	return sc
}
func (sc io) nextArr(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = sc.nextInt()
	}
	return a
}
func (sc io) nextString() string {
	sc.inp.Scan()
	return sc.inp.Text();
}

func (sc io) nextInt64() int64 {
	v, _ := strconv.ParseInt(sc.nextString(), 10, 64)
	return int64(v)
}
func (sc io) nextInt() int {
	v, _ := strconv.ParseInt(sc.nextString(), 10, 32)
	return int(v)
}

func (out io) print (s string) {
	out.out.WriteString(s)
}


package main

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

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

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

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

func main() {
    defer writer.Flush()
    scanner.Split(bufio.ScanWords)
    var q int
    a := make([]string, 3)
    a[0] = "qwertyuiop"
    a[1] = "asdfghjkl;"
    a[2] = "zxcvbnm,./"
    s := ReadString()
    if s == "R" {
        q = -1
    } else {
        q = 1
    }
    s = ReadString()
    r := ""
    dicti := make(map[uint8]int)
    dictj := make(map[uint8]int)
    for j := 0; j < 3; j++ {
        for i := 0; i < 10; i++ {
            dicti[a[j][i]] = i
            dictj[a[j][i]] = j
        }
    }
    for i := 0; i < len(s); i++ {
        r += string(a[dictj[s[i]]][dicti[s[i]]+q])
    }
    writer.WriteString(r)
    writer.WriteString("\n")
}


package main

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

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

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

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

func main() {
    defer writer.Flush()
    scanner.Split(bufio.ScanWords)
    var q int
    keyboard := "qwertyuiopasdfghjkl;zxcvbnm,./"
    dict := make(map[uint8]int)

    if ReadString() == "R" {
        q = -1
    } else {
        q = 1
    }

    s := ReadString()
    for i := 0; i < len(keyboard); i++ {
        dict[keyboard[i]] = i
    }

    r := ""
    for i := range s {
        r += string(keyboard[dict[s[i]]+q])
    }

    writer.WriteString(r + "\n")
}


package main

import "fmt"

func main() {
	upperRow := map[string]int{"q": 1, "w": 2, "e": 3, "r": 4, "t": 5, "y": 6, "u": 7, "i": 8, "o": 9, "p": 10}
	lookUpUpperRow := map[int]string{1: "q", 2: "w", 3: "e", 4: "r", 5: "t", 6: "y", 7: "u", 8: "i", 9: "o", 10: "p"}

	middleRow := map[string]int{"a": 1, "s": 2, "d": 3, "f": 4, "g": 5, "h": 6, "j": 7, "k": 8, "l": 9, ";": 10}
	lookUpMiddleRow := map[int]string{1: "a", 2: "s", 3: "d", 4: "f", 5: "g", 6: "h", 7: "j", 8: "k", 9: "l", 10: ";"}

	lowerRow := map[string]int{"z": 1, "x": 2, "c": 3, "v": 4, "b": 5, "n": 6, "m": 7, ",": 8, ".": 9, "/": 10}
	lookUpLowerRow := map[int]string{1: "z", 2: "x", 3: "c", 4: "v", 5: "b", 6: "n", 7: "m", 8: ",", 9: ".", 10: "/"}

	var shiftDirection, inputString string

	fmt.Scanf("%s\n", &shiftDirection)

	fmt.Scanf("%s\n", &inputString)

	strSize := len(inputString)

	for i := 0; i < strSize; i++ {
		if upperRow[string(inputString[i])] != 0 {
			targetPos := upperRow[string(inputString[i])]
			if shiftDirection == "R" {
				fmt.Print(lookUpUpperRow[targetPos-1])
			} else {
				fmt.Print(lookUpUpperRow[targetPos+1])
			}
		} else if middleRow[string(inputString[i])] != 0 {
			targetPos := middleRow[string(inputString[i])]
			if shiftDirection == "R" {
				fmt.Print(lookUpMiddleRow[targetPos-1])
			} else {
				fmt.Print(lookUpMiddleRow[targetPos+1])
			}
		} else {
			targetPos := lowerRow[string(inputString[i])]
			if shiftDirection == "R" {
				fmt.Print(lookUpLowerRow[targetPos-1])
			} else {
				fmt.Print(lookUpLowerRow[targetPos+1])
			}
		}
	}

	fmt.Println()

}


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 d int
  scanf("%d\n", &d)
  r := make([]int, d)
  b := make([]int, d)
  for i := range r {
    scanf("%d", &r[i])
  }
  scanf("\n")
  for i := range b {
    scanf("%d", &b[i])
  }
  solve(r, b)
}

func solve(r, b []int) {
  rr, bb := 0, 0
  for i := range r {
    if r[i] > b[i] {
      rr++
    }
    if r[i] < b[i] {
      bb++
    }
  }
  score := 1
  if rr == 0 {
    score = -1
  } else if bb >= rr {
    score = (bb-rr+1)/rr + 1
    if (bb-rr+1)%rr > 0 {
      score++
    }
  }
  printf("%d", score)
}


package main

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

func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var n int
	Fscan(in, &n)
	a := make([]int, n)
	for i := range a {
		Fscan(in, &a[i])
	}
	b := make([]int, n)
	cnt1, cnt0 := 0, 0
	for i := range b {
		Fscan(in, &b[i])
		if a[i] == 1 && b[i] == 0 {
			cnt1++
		} else if a[i] == 0 && b[i] == 1 {
			cnt0++
		}
	}

	if cnt1==0 {
		Fprintln(out, -1)
		return
	}

	if cnt0 == 0 {
		Fprintln(out, 1)
		return
	}

	if cnt0 %cnt1 == 0 {
		Fprintln(out, cnt0/cnt1+1)
	} else {
		ans := (cnt0-1)/cnt1+1
		Fprintln(out, ans)
	}

}

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


package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	r := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&r[i])
	}
	b := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&b[i])
	}
	rls := solve(n, r, b)
	fmt.Println(rls)
}

func solve(n int, r, b []int) int {
	nr, nb := 0, 0
	for i := 0; i < n; i++ {
		if r[i] == 1 && b[i] == 0 {
			nr += 1
		}
		if r[i] == 0 && b[i] == 1 {
			nb += 1
		}
	}
	var rls int
	if nr == 0 {
		rls = -1
	} else {
		rls = nb/nr + 1
	}
	return rls
}


package main

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

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

type V struct {
	P, Pchar, Link int
	Next, Walk [26]int
}

func (node V) String() string {
	return fmt.Sprintf("p = %v, pchar = %v, link = %v", node.P, node.Pchar, node.Link)
}

func CreateNode(p, pchar int) *V {
	v := &V{P:p, Pchar:pchar, Link:-1}
	for i := 0; i < len(v.Next); i++ {
		v.Next[i], v.Walk[i] = -1, -1
	}
	return v
}

func AddString(a string) {
	var v int = 0
	for i := 0; i < len(a); i++ {
		var c int = int(a[i] - 'A')
		if tree[v].Next[c] == -1 {
			tree[size] = CreateNode(v, c)
			tree[v].Next[c] = size
			size++
		}
		v = tree[v].Next[c]
	}
}

func Walk(v, c int) int {
	if tree[v].Walk[c] != -1 {
		return tree[v].Walk[c]
	}
	if tree[v].Next[c] != -1 {
		tree[v].Walk[c] = tree[v].Next[c]
	}else {
		if v == 0 {
			tree[v].Walk[c] = 0
		}else {
			tree[v].Walk[c] = Walk(Getlink(v), c)
		}
	}
	return tree[v].Walk[c]
}

func Getlink(v int) int {
	if tree[v].Link != -1 {
		return tree[v].Link
	}
	if v == 0 || tree[v].P == 0 {
		tree[v].Link = 0
	}else {
		tree[v].Link = Walk(Getlink(tree[v].P), tree[v].Pchar)
	}
	return tree[v].Link
}

func Dp(i, j, k int) int {
	// if k == v {
	// 	return -oo
	// }
	if i == n {
		return 0
	}
	if j == m {
		return 0
	}

	if dp[i][j][k] != -1 {
		return dp[i][j][k]
	}

	var ret int = -oo
	if a[i] == b[j] {
		var next int = Walk(k, int(a[i] - 'A'))
		if next != v {
			ret = Max(ret, Dp(i + 1, j + 1, next) + 1)
		}
	}

	ret = Max(ret, Dp(i + 1, j, k))
	ret = Max(ret, Dp(i, j + 1, k))

	dp[i][j][k] = ret
	return ret
}

func Print(i, j, k int) {
	if i == n {
		return
	}
	if j == m {
		return
	}
	if a[i] == b[j] {
		var ret, which int = Dp(i + 1, j, k), 0
		if ret < Dp(i, j + 1, k) {
			ret, which = Dp(i, j + 1, k), 1
		}
		var next int = Walk(k, int(a[i] - 'A'))
		if next != v {
			if ret <= Dp(i + 1, j + 1, next) {
				ret, which = Dp(i + 1, j + 1, next), 2
			}
		}

		if which == 0 {
			Print(i + 1, j, k)
		}else if which == 1 {
			Print(i, j + 1, k)
		}else {
			fmt.Fprint(out, string(a[i]))
			Print(i + 1, j + 1, next)
		}

	}else {
		var ret int = Dp(i + 1, j , k)
		if ret < Dp(i, j + 1, k) {
			Print(i, j + 1, k)
		}else {
			Print(i + 1, j, k)
		}
	}
}

const oo = 1<<30

var n, m, v int
var a, b, c string
var size int
var tree [110]*V

var dp [][][]int

func main() {

	defer out.Flush()
	in.Split(bufio.ScanWords)

	a, b, c = Next(), Next(), Next()
	n, m, v = len(a), len(b), len(c)
	tree[size] = CreateNode(-1, -1)
	size++
	AddString(c)

	dp = make([][][]int, n)
	for i := 0; i < n; i++ {
		dp[i] = make([][]int, m)
		for j := 0; j < m; j++ {
			dp[i][j] = make([]int, v)
			for k := 0; k < v; k++ {
				dp[i][j][k] = -1
			}
		}
	}

	var ret int = Dp(0, 0, 0)
	// fmt.Fprintln(out, ret)
	if ret <= 0 {
		fmt.Fprintln(out, 0)
	}else {
		Print(0, 0, 0)
		fmt.Fprintln(out);
	}
}

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

func Next() string{
	if !in.Scan() {
		panic("Scan error")
	}
	return in.Text()
}

func NextInt() int{
	ret, _ := strconv.Atoi(Next())
	return ret
}


package main

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

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

type V struct {
	P, Pchar, Link int
	Next, Walk [26]int
}

func (node V) String() string {
	return fmt.Sprintf("p = %v, pchar = %v, link = %v", node.P, node.Pchar, node.Link)
}

func CreateNode(p, pchar int) *V {
	v := &V{P:p, Pchar:pchar, Link:-1}
	for i := 0; i < len(v.Next); i++ {
		v.Next[i], v.Walk[i] = -1, -1
	}
	return v
}

func AddString(a string) {
	var v int = 0
	for i := 0; i < len(a); i++ {
		var c int = int(a[i] - 'A')
		if tree[v].Next[c] == -1 {
			tree[size] = CreateNode(v, c)
			tree[v].Next[c] = size
			size++
		}
		v = tree[v].Next[c]
	}
}

func Walk(v, c int) int {
	if tree[v].Walk[c] != -1 {
		return tree[v].Walk[c]
	}
	if tree[v].Next[c] != -1 {
		tree[v].Walk[c] = tree[v].Next[c]
	}else {
		if v == 0 {
			tree[v].Walk[c] = 0
		}else {
			tree[v].Walk[c] = Walk(Getlink(v), c)
		}
	}
	return tree[v].Walk[c]
}

func Getlink(v int) int {
	if tree[v].Link != -1 {
		return tree[v].Link
	}
	if v == 0 || tree[v].P == 0 {
		tree[v].Link = 0
	}else {
		tree[v].Link = Walk(Getlink(tree[v].P), tree[v].Pchar)
	}
	return tree[v].Link
}

func Dp(i, j, k int) int {
	if k == v {
		return -oo
	}
	if i == n {
		return 0
	}
	if j == m {
		return 0
	}

	if dp[i][j][k] != -1 {
		return dp[i][j][k]
	}

	var ret int = -oo
	if a[i] == b[j] {
		var next int = Walk(k, int(a[i] - 'A'))
		// if next != v {
		ret = Max(ret, Dp(i + 1, j + 1, next) + 1)
		// }
	}

	ret = Max(ret, Dp(i + 1, j, k))
	ret = Max(ret, Dp(i, j + 1, k))

	dp[i][j][k] = ret
	return ret
}

func Print(i, j, k int) {
	if i == n {
		return
	}
	if j == m {
		return
	}
	if a[i] == b[j] {
		var ret, which int = Dp(i + 1, j, k), 0
		if ret < Dp(i, j + 1, k) {
			ret, which = Dp(i, j + 1, k), 1
		}
		var next int = Walk(k, int(a[i] - 'A'))
		if next != v {
			if ret <= Dp(i + 1, j + 1, next) {
				ret, which = Dp(i + 1, j + 1, next), 2
			}
		}

		if which == 0 {
			Print(i + 1, j, k)
		}else if which == 1 {
			Print(i, j + 1, k)
		}else {
			fmt.Fprint(out, string(a[i]))
			Print(i + 1, j + 1, next)
		}

	}else {
		var ret int = Dp(i + 1, j , k)
		if ret < Dp(i, j + 1, k) {
			Print(i, j + 1, k)
		}else {
			Print(i + 1, j, k)
		}
	}
}

const oo = 1<<30

var n, m, v int
var a, b, c string
var size int
var tree [110]*V

var dp [][][]int

func main() {

	defer out.Flush()
	in.Split(bufio.ScanWords)

	a, b, c = Next(), Next(), Next()
	n, m, v = len(a), len(b), len(c)
	tree[size] = CreateNode(-1, -1)
	size++
	AddString(c)

	dp = make([][][]int, n)
	for i := 0; i < n; i++ {
		dp[i] = make([][]int, m)
		for j := 0; j < m; j++ {
			dp[i][j] = make([]int, v)
			for k := 0; k < v; k++ {
				dp[i][j][k] = -1
			}
		}
	}

	var ret int = Dp(0, 0, 0)
	// fmt.Fprintln(out, ret)
	if ret <= 0 {
		fmt.Fprintln(out, 0)
	}else {
		Print(0, 0, 0)
		fmt.Fprintln(out);
	}
}

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

func Next() string{
	if !in.Scan() {
		panic("Scan error")
	}
	return in.Text()
}

func NextInt() int{
	ret, _ := strconv.Atoi(Next())
	return ret
}


package main

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

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

type V struct {
	P, Pchar, Link int
	Next, Walk [26]int
}

func (node V) String() string {
	return fmt.Sprintf("p = %v, pchar = %v, link = %v", node.P, node.Pchar, node.Link)
}

func CreateNode(p, pchar int) *V {
	v := &V{P:p, Pchar:pchar, Link:-1}
	for i := 0; i < len(v.Next); i++ {
		v.Next[i], v.Walk[i] = -1, -1
	}
	return v
}

func AddString(a string) {
	var v int = 0
	for i := 0; i < len(a); i++ {
		var c int = int(a[i] - 'A')
		if tree[v].Next[c] == -1 {
			tree[size] = CreateNode(v, c)
			tree[v].Next[c] = size
			size++
		}
		v = tree[v].Next[c]
	}
}

func Walk(v, c int) int {
	if tree[v].Walk[c] != -1 {
		return tree[v].Walk[c]
	}
	if tree[v].Next[c] != -1 {
		tree[v].Walk[c] = tree[v].Next[c]
	}else {
		if v == 0 {
			tree[v].Walk[c] = 0
		}else {
			tree[v].Walk[c] = Walk(Getlink(v), c)
		}
	}
	return tree[v].Walk[c]
}

func Getlink(v int) int {
	if tree[v].Link != -1 {
		return tree[v].Link
	}
	if v == 0 || tree[v].P == 0 {
		tree[v].Link = 0
	}else {
		tree[v].Link = Walk(Getlink(tree[v].P), tree[v].Pchar)
	}
	return tree[v].Link
}

func Dp(i, j, k int) int {
	if k == v {
		return -oo
	}
	if i == n {
		return 0
	}
	if j == m {
		return 0
	}

	if dp[i][j][k] != -1 {
		return dp[i][j][k]
	}

	var ret int = -oo
	if a[i] == b[j] {
		var next int = Walk(k, int(a[i] - 'A'))
		if next != v {
			ret = Max(ret, Dp(i + 1, j + 1, next) + 1)
		}
	}

	ret = Max(ret, Dp(i + 1, j, k))
	ret = Max(ret, Dp(i, j + 1, k))

	dp[i][j][k] = ret
	return ret
}

func Print(i, j, k int) {
	if i == n {
		return
	}
	if j == m {
		return
	}
	if a[i] == b[j] {
		var ret, which int = Dp(i + 1, j, k), 0
		if ret < Dp(i, j + 1, k) {
			ret, which = Dp(i, j + 1, k), 1
		}
		var next int = Walk(k, int(a[i] - 'A'))
		if next != v {
			if ret <= Dp(i + 1, j + 1, next) {
				ret, which = Dp(i + 1, j + 1, next), 2
			}
		}

		if which == 0 {
			Print(i + 1, j, k)
		}else if which == 1 {
			Print(i, j + 1, k)
		}else {
			fmt.Fprint(out, string(a[i]))
			Print(i + 1, j + 1, next)
		}

	}else {
		var ret int = Dp(i + 1, j , k)
		if ret < Dp(i, j + 1, k) {
			Print(i, j + 1, k)
		}else {
			Print(i + 1, j, k)
		}
	}
}

const oo = 1<<30

var n, m, v int
var a, b, c string
var size int
var tree [110]*V

var dp [][][]int

func main() {

	defer out.Flush()
	in.Split(bufio.ScanWords)

	a, b, c = Next(), Next(), Next()
	n, m, v = len(a), len(b), len(c)
	tree[size] = CreateNode(-1, -1)
	size++
	AddString(c)

	dp = make([][][]int, n)
	for i := 0; i < n; i++ {
		dp[i] = make([][]int, m)
		for j := 0; j < m; j++ {
			dp[i][j] = make([]int, v)
			for k := 0; k < v; k++ {
				dp[i][j][k] = -1
			}
		}
	}

	var ret int = Dp(0, 0, 0)
	// fmt.Fprintln(out, ret)
	if ret <= 0 {
		fmt.Fprintln(out, 0)
	}else {
		Print(0, 0, 0)
		fmt.Fprintln(out);
	}
}

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

func Next() string{
	if !in.Scan() {
		panic("Scan error")
	}
	return in.Text()
}

func NextInt() int{
	ret, _ := strconv.Atoi(Next())
	return ret
}


package main

import "fmt"

func main() {
	var n,k,w int;
	fmt.Scanf("%d%d%d",&k,&n,&w);
	if (((w*(w+1))/2)*k)-n >0{
		fmt.Print((((w*(w+1))/2)*k)-n );

	}else {
		fmt.Print(0)
	};
}


package main;

import (
  "fmt"
)

func main() {
  var n, k, w int64;
  fmt.Scanf("%d %d %d", &k, &n, &w);
  var ans = w * (w + 1) / 2 * k - n;
  if ans < 0 {
    ans = 0;
  }
  fmt.Printf("%d", ans);
}


package main

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

func main() {
	var n, k, w, sum int
	reader := bufio.NewReader(os.Stdin)
	fmt.Fscanln(reader, &n, &k, &w)
	for i := 1; i <= w; i++ {
		sum += i * n
	}

	ret := sum - k

	if ret < 0 {
		fmt.Println(0)
	} else {
		fmt.Println(ret)
	}
}


package main
import (
    "fmt"
    //"unicode/utf8"
)

func main() {
    var n,x int
    fmt.Scan(&n)
    x=n/2*3
    fmt.Println(x)

}


package main

import (
	"fmt"
)

func main() {
	var n int
	if _, err := fmt.Scanf("%d\n", &n); err != nil {
		return
	}

	fmt.Println(n / 2 * 3)
}


package main
import (
	"fmt"
	//"unicode/utf8"
)

func main() {
	var n,x int
	fmt.Scan(&n)
	x=n/2*3
	fmt.Println(x)

}


package main

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

func solve() {
	a := readInt64()
	b := readInt64()

	res := int64(1)
	cnt := 0
	for i := a + 1; i <= b; i++ {
		m := int64(1)
		if i != 0 {
			m = i
		}
		m %= 10
		res %= 10
		res *= m
		if cnt > 10 {
			break
		}
		cnt++
	}
	fmt.Println(res % 10)
}

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

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

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

// IO

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

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

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


package main

import "fmt"

func main() {
	var a, b, r int64;
	fmt.Scan(&a, &b)
	for r = 1; a < b; b-- {
		r *= b % 10
		if r == 0 {
			break
		}
	}
	fmt.Println(r % 10)
}


package main
import "fmt"

func main() {
    var a, b, x int64
    x = 1

    fmt.Scan(&a, &b);

    for i := a + 1; i <= b; i++ {
        x = (x * i % 10) % 10
        if x == 0 {
            break
        }
    }

    fmt.Println(x);
}


package main

import (
	. "fmt"
	"strings"
)

// github.com/EndlessCheng/codeforces-go
func main() {
	var x string
	Scan(&x)
	n := len(x)
	if n == 1 {
		Print(x)
		return
	}
	data := []byte(x)
	sum := 0
	for _, c := range x {
		sum += int(c - '0')
	}
	if x[1] == '9' {
		decPos := 1
		for i, c := range x[1:] {
			if c != '9' {
				break
			}
			decPos = i + 1
		}
		data[decPos] = '8'
		if newSum := int(data[0]-'0') + 8 + 9*(n-2); newSum <= sum {
			Print(x)
			return
		}
		x9 := strings.Repeat("9", n-1-decPos)
		Print(string(data[:decPos]) + "8" + x9)
		return
	}
	data[0]--
	if newSum := int(data[0]-'0') + 9*(n-1); newSum <= sum {
		Print(x)
		return
	}
	x9 := strings.Repeat("9", n-1)
	if data[0] == '0' {
		Print(x9)
	} else {
		Print(string(data[0]) + x9)
	}
}


// A1. Good Matrix Elements
/*
The Smart Beaver from ABBYY got hooked on square matrices. Now he is busy studying an n × n size matrix, where n is odd. The Smart Beaver considers the following matrix elements good:

    Elements of the main diagonal.
    Elements of the secondary diagonal.
    Elements of the "middle" row — the row which has exactly rows above it and the same number of rows below it.
    Elements of the "middle" column — the column that has exactly columns to the left of it and the same number of columns to the right of it.

The figure shows a 5 × 5 matrix. The good elements are marked with green.

Help the Smart Beaver count the sum of good elements of the given matrix.

Input
The first line of input data contains a single odd integer n. Each of the next n lines contains n integers a ij (0 ≤ a ij ≤ 100) separated by single spaces — the elements of the given matrix.

The input limitations for getting 30 points are:

    1 ≤ n ≤ 5

The input limitations for getting 100 points are:

    1 ≤ n ≤ 101

Output
Print a single integer — the sum of good matrix elements.

Examples
Input
3
1 2 3
4 5 6
7 8 9

Output
45

Input
5
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1

Output
17

Note
In the first sample all matrix elements will be good. Good elements in the second sample are shown on the figure.
*/
package main

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

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

	total := 0
	for i := 0; i < n; i++ {
		input2, _ := reader.ReadString('\n')
		for j := 0; j < n; j++ {
			arr := strings.Split(strings.TrimSpace(input2), " ")
			x, _ := strconv.Atoi(arr[j])
			if i == j {
				total += x
			} else if i+j == n-1 {
				total += x
			} else if j == (n-1)/2 {
				total += x
			} else if i == (n-1)/2 {
				total += x
			}
		}
	}
	fmt.Print(total)
}


package main

import "fmt"
import "math"

var n float64

func main() {
        fmt.Scanln(&n)
        if int(n)%2 != 0 {
                fmt.Println(0)
                return
        }
        ans := int(math.Ceil(((n / 2) / 2)))
        ans -= 1
        fmt.Println(ans)
}


// stick.go
package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	c := 0
	if n%2 == 0 {
		c = int((n - 1) / 4)
	}
	fmt.Println(c)
}


package main

import 	"fmt"

func main() {
	var n int
	fmt.Scan(&n)
	a := 0
	if n%2 == 0 {
		a = int((n - 1) / 4)
	}
	fmt.Println(a)
}


package main

import (
	"fmt"
)

func factor(mp map[int]int,n int)  {
	for i:=2 ; i*i <= n; i++ {
		for n%i==0 {
			n/=i
			mp[i]++
		}
	}
	if n>1 {
		mp[n]++
	}
}
func newRes(mp map[int]int) int{
	val:=1
	for k,v := range mp {
		//fmt.Printf("k:%d,v:%d\n",k,v)
		for cnt:=0;cnt<(v+1)/2;cnt++ {
			val*=k
		}
	}
	return val
}

func main()  {
	var n int
	_,_=fmt.Scanln(&n)
	mp:=make(map[int]int)
	res,step:=n,0
	for {
		for k,_:= range mp {
			delete(mp,k)
		}
		factor(mp,res)
		ret:=newRes(mp)
		//fmt.Printf("before:%d ,after:%d\n",res,ret)
		if ret == res {
			break
		} else {
			step++
			res=ret
		}
	}
	flag:=false
	val:=res
	for {
		if val > n/val {
			break
		}

		val*=val
		if val== n{
			flag=true
			break
		}
	}
	if res==n {//prime
		step=0
	}else if !flag {//square
		step=step+1
	}
	fmt.Println(res,step)
}


package main

import (
	"bufio"
	"fmt"
	"math/bits"
	"os"
	"strconv"
)

var scanner *bufio.Scanner

func init() {
	scanner = bufio.NewScanner(bufio.NewReader(os.Stdin))
	//scanner.Buffer(make([]byte, 311000), 311000)
	scanner.Split(bufio.ScanWords)
}

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

func nextInt() int {
	num, err := strconv.Atoi(next())
	if err != nil {
		panic(err)
	}
	return num
}

func genPrimes() []int {
	primes := make([]int, 0, 170)
	var isDivisible [1001]bool
	for i := 2; i <= 1000; i++ {
		if !isDivisible[i] {
			primes = append(primes, i)
			for j := i + i; j <= 1000; j += i {
				isDivisible[j] = true
			}
		}
	}
	return primes
}

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

func main() {
	N := nextInt()
	if N == 1 {
		fmt.Println("1 0")
		return
	}
	primes := genPrimes()

	primeFactors := make(map[int]int)
	for _, p := range primes {
		for N%p == 0 {
			N /= p
			primeFactors[p]++
		}
		if N == 1 {
			break
		}
	}

	if N != 1 {
		primeFactors[N]++
	}

	//fmt.Fprintln(os.Stderr, primeFactors)

	maxExp := 0
	for _, exp := range primeFactors {
		if exp > maxExp {
			maxExp = exp
		}
	}

	bitlen := uint(bits.Len(uint(maxExp)))
	pow := 1 << (bitlen - 1)
	numSqrts := int(bitlen) - 1
	if pow < maxExp {
		pow <<= 1
		numSqrts++
	}

	base := 1
	muls := 0
	for p, exp := range primeFactors {
		base *= p
		if exp < pow {
			muls = 1
		}
	}

	fmt.Println(base, muls+numSqrts)
}


/*
URL:
https://codeforces.com/problemset/problem/1062/B
*/

package main

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

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

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

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

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

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

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

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

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

var (
	n int
)

func main() {
	n = ReadInt()

	if n == 1 {
		fmt.Println(1, 0)
		return
	}

	memo := TrialDivision(n)
	PrintfDebug("n: %v\n", memo)

	fin := 1
	for k := range memo {
		fin *= k
	}

	M := make(map[int]int)
	S := make(map[int]int)
	for k, v := range memo {
		mul := 0
		sqrt := 0
		for v > 1 {
			if v%2 == 1 {
				v++
				mul++
			} else {
				v /= 2
				sqrt++
			}
		}
		M[k] = mul
		S[k] = sqrt
	}

	maxSqrt := 0
	for _, v := range S {
		ChMax(&maxSqrt, v)
	}
	// ans := 0
	// for k, v := range S {
	// 	ans += v
	// 	ans += M[k]

	// 	ans += 2 * (maxSqrt - v)
	// }

	// if maxSqrt > 0 {
	// 	fmt.Println(fin, maxSqrt+1)
	// } else {
	// 	fmt.Println(fin, 0)
	// }

	if maxSqrt == 0 {
		fmt.Println(fin, 0)
		return
	}

	// maxSqrtと異なるものがあれば掛け算は必要
	for _, v := range S {
		if v != maxSqrt {
			fmt.Println(fin, maxSqrt+1)
			return
		}
	}
	// 掛け算が一回でも要求されていれば掛け算は必要
	for _, v := range M {
		if v > 0 {
			fmt.Println(fin, maxSqrt+1)
			return
		}
	}

	fmt.Println(fin, maxSqrt)
}

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

// TrialDivision returns the result of prime factorization of integer N.
func TrialDivision(n int) map[int]int {
	var i, exp int
	p := map[int]int{}

	if n <= 1 {
		panic(errors.New("[argument error]: TrialDivision only accepts a NATURAL number"))
	}

	for i = 2; i*i <= n; i++ {
		exp = 0
		for n%i == 0 {
			exp++
			n /= i
		}

		if exp == 0 {
			continue
		}
		p[i] = exp
	}
	if n > 1 {
		p[n] = 1
	}

	return p
}

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

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

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

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

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

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

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

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

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

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

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

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

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

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

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

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

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

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

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

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

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

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

	return string(res)
}

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

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

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

	return string(res)
}

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

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


package main

import "os"
import "bufio"
import "strconv"
import "math"

func sum(n int64) int64 {
	var summ int64
	for n > 0 {
		summ += n%10
		n /= 10
	}
	return summ
}

func main(){
	var n int64
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	w := bufio.NewWriter(os.Stdout)
	r.Scan()
	n, _ = strconv.ParseInt(r.Text(), 0, 64)
	var l int64 = int64(math.Sqrt(float64(n)))-40
	if l < 0 {
		l = 1
	}
	var s int64 = int64(math.Sqrt(float64(n)))+1
	for i:=l; i<s; i++ {
		if i*i+i*sum(i) == n {
			w.WriteString(strconv.FormatInt(i, 10)+"\n")
			w.Flush()
			return
		}
	}
	w.WriteString("-1\n")
	w.Flush()
}


package main

import (
	"fmt"
)

func pow(x, y int) uint64 {
	var ans uint64
	ans = 1
	for i := 0; i < y; i++ {
		ans *= uint64(x)
	}
	return ans
}

func calc_s(x uint64) uint64 {
	var ans uint64
	ans = 0
	for x != 0 {
		ans += x % 10
		x /= 10
	}
	return ans
}

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

	ans := make([]int, 81, 81)
	i := 0
	for s := 1; s <= 81; s++ {
		var x uint64
		x = uint64(b)*pow(s, a) + uint64(c)
		if x < uint64(1000000000) && uint64(s) == calc_s(x) {
			ans[i] = int(x)
			i++
		}
	}

	fmt.Println(i)
	if i > 0 {
		for j := 0; j < i; j++ {
			fmt.Print(ans[j], " ")
		}
		fmt.Println()
	}
}


package main

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

func S(x int64) int64 {
	var res int64 = 0
	for x != 0 {
		res += x % 10
		x /= 10
	}
	return res
}

func Pow(x, a int64) int64 {
	var res int64 = 1
	for i := 0; int64(i) < a; i++ {
		res *= x
	}
	return res
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	var a, b, c int64
	fmt.Fscan(reader, &a, &b, &c)
	var num_res = 0
	var res []int64 = make([]int64, 40)
	for i := 1; i < 82; i++ {
		var x int64 = b*Pow(int64(i), a) + c
		if x < 1000000000 && S(x) == int64(i) {
			res[num_res] = x
			num_res++
		}
	}
	fmt.Fprintln(writer, num_res)
	for i := 0; i < num_res; i++ {
		fmt.Fprintf(writer, "%d ", res[i])
	}
	fmt.Fprintln(writer)
	writer.Flush()
}


package main

import (
	"fmt"
	"sort"
)

func sum(x int64) int64 {
	res := int64(0)
	for x > 0 {
		res += x % 10
		x /= 10
	}
	return res
}

func main() {
	var b, c int64
	var a int
	fmt.Scan(&a, &b, &c)
	var res []int
	for s := int64(1); s <= 9*9; s++ {
		r := s
		for i := 1; i < a; i++ {
			r *= s
		}
		r = b*r + c
		if sum(r) == s && r < 1000000000 {
			res = append(res, int(r))
		}
	}

	sort.Ints(res)
	fmt.Println(len(res))
	for i, r := range res {
		fmt.Print(r)
		if i == len(res)-1 {
			fmt.Print("\n")
		} else {
			fmt.Print(" ")
		}
	}
}


package main

import "fmt"

func main() {
    var n,m int
    fmt.Scan(&n,&m)
    if n == 0 {
        if m == 0 {
            fmt.Println(0,0)
        } else {
            fmt.Println("Impossible")
        }
    } else {
        var min,max int
        if m > n { min = n+(m-n) } else { min = n }
        if m > 0 { max = n+m-1 } else { max = n }
        fmt.Println(min,max)
    }
}


//1.6.2
package main
import("fmt")
func main(){
    var a,b int
    fmt.Scan(&a,&b)
    if a<1&&b>0{fmt.Println("Impossible")
    }else{if b-a>0{fmt.Print(a+b-a)}else{fmt.Print(a)}
        fmt.Print(" ")
        if b>0{fmt.Print(a+b-1)}else{fmt.Print(a)}
    }
}


//1.6.2
package main
import("fmt")
func main(){
    var a,b int
    fmt.Scan(&a,&b)
    if a<1&&b>0{fmt.Println("Impossible")
    }else{
        if b-a>0{fmt.Print(a+b-a)}else{fmt.Print(a)}
        fmt.Print(" ")
        if b>0{fmt.Print(a+b-1)}else{fmt.Print(a)}
    }
}


// 131C-mic_rizal
package main

import (
    "fmt"
)

func c(n, r int64) int64 {
    var i int64
    if r > n {
        return 0
    }
    a := int64(1)
    for i = r + 1; i <= n; i++ {
        a *= i
        a /= (i - r)
    }
    return a
}

func main() {
    var n, m, t, a, i int64
    fmt.Scan(&n, &m, &t)
    for i = 4; i < t; i++ {
        a += c(n, i) * c(m, t-i)
    }
    fmt.Println(a)
}


// 131C
package main

import (
	"fmt"
)

func c(n int64, k int64) int64 {
	var i, r int64
	r = 1
	for i = 1; i <= k; i++ {
		r = r * (n - k + i)
		r = r / i
	}
	return r
}

func main() {
	var i, n, m, t, tot int64
	tot = 0
	fmt.Scan(&n, &m, &t)
	for i = 4; i < t; i++ {
		tot = tot + c(n, i)*c(m, t-i)
	}
	fmt.Println(tot)
}


package main

import (
	"fmt"
)

func build_tree() [][]uint64 {
	output := make([][]uint64, 35)
	for i:=0; i<=30; i++ {
		t := make([]uint64, 35)
		t[0]=1
		for j:=1; j<=i; j++ {
			t[j] = output[i-1][j] + output[i-1][j-1]
		}
		output[i] = t
	}
	return output
}

func main() {
	tree := build_tree()
	var n, m, t int
	var ans uint64
	fmt.Scan(&n, &m, &t)
	for i:=4; i<=n; i++ {
		if t-i < 1 || t-i > 30 {continue}
		ans += tree[n][i] * tree[m][t-i]
	}
	fmt.Println(ans)
}


package main

import "fmt"

func main() {
	s := make([]string, 4)
	for i := range s {
		fmt.Scanln(&s[i])
	}
	for i := 0; i < 3; i++ {
		for j := 0; j < 3; j++ {
			cnt := 0
			if s[i][j] == '.' {
				cnt++
			}
			if s[i+1][j] == '.' {
				cnt++
			}
			if s[i][j+1] == '.' {
				cnt++
			}
			if s[i+1][j+1] == '.' {
				cnt++
			}
			if cnt != 2 {
				fmt.Println("YES")
				return
			}
		}
	}
	fmt.Println("NO")
}


package main

import "fmt"

func check(x [4]string, a int, b int) bool {
    cnt := 0
    for i := a; i < (a+2); i++ {
        for j := b; j < (b+2); j++ {
            if x[i][j] != x[a][b] { cnt++ }
        }
    }
    if cnt == 2 { return false } else { return true }
}

func main() {
    var x [4]string
    for i := 0; i < 4; i++ {
        fmt.Scan(&x[i])
    }
    ans := false
    for i := 0; i < 3; i++ {
        for j := 0; j < 3; j++ {
            if check(x,i,j) {
                ans = true
                break
            }
        }
    }
    if ans { fmt.Println("YES") } else { fmt.Println("NO") }
}


package main

import (
	"fmt"
	"math"
	"strconv"
)

func main() {
	var nFloors int
	var sResident string
	var as []int
	_, _ = fmt.Scanln(&nFloors)

	for i := 0; i < nFloors; i++ {
		_, _ = fmt.Scan(&sResident)
		resident, _ := strconv.Atoi(sResident)
		as = append(as, resident)
	}

	bestX := math.MaxInt32
	for x := 0; x < len(as); x++ {
		if sum := sumForXA(x, as); sum < bestX {
			bestX = sum
		}
	}
	fmt.Println(bestX)
}

func sumForXA(x int, a []int) int {
	units := 0
	for i := 0; i < len(a); i++ {
		if a[i] > 0 {
			sum := 0
			// move from x to i
			sum += int(math.Abs(float64(i - x)))
			// move from i to 0
			sum += i
			// move from 0 to x
			sum += x
			// twice (elevator down, up)
			sum *= 2
			// multiply with a
			sum *= a[i]
			units += sum
		}
	}
	return units
}


package main

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

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

var scanner = bufio.NewScanner(os.Stdin)

func scanNum() int {
	scanner.Scan()
	num, _ := strconv.Atoi(scanner.Text())
	return num
}
func main() {
	scanner.Split(bufio.ScanWords)
	n := scanNum()
	p := make([]int, n)
	for i := 0; i < n; i++ {
		p[i] = scanNum()
	}
	min := math.MaxInt32
	for i := 0; i < n; i++ {
		sum := 0
		for j := 0; j < n; j++ {
			// Day
			sum += (abs(i-j) + j + i) * p[j]
			// Night
			sum += (i + j + abs(i-j)) * p[j]
		}
		if sum < min {
			min = sum
		}
	}
	fmt.Println(min)
}


package main

import (
        "fmt"
)

var num int

func main() {
        fmt.Scan(&num)
        cvs := make([]int, num)
        var tmp int
        count := 0
        for i := 0; i < num; i++ {
                fmt.Scan(&tmp)
                cvs[i] = tmp
                if tmp == 1 {
                        count++
                }
        }
        ans := count
        zeros := 0
        for _, val := range cvs {
                if val == 0 {
                        zeros++
                } else {
                        count--
                }
                res := count + zeros
                if res > ans {
                        ans = res
                }
        }
        fmt.Println(ans)
}


package main

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

const maxTokenSize = 512 * 1024

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, maxTokenSize), maxTokenSize)

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

	a := make([]int, n)

	for i := 0; i < n; i++ {
		scanner.Scan()
		a[i], _ = strconv.Atoi(scanner.Text())
	}

	minTotal := n

	for i := 0; i <= n; i++ {
		localTotal := 0
		for j := 0; j < i; j++ {
			if a[j] != 0 {
				localTotal++
			}
		}
		for j := i; j < n; j++ {
			if a[j] != 1 {
				localTotal++
			}
		}
		if localTotal < minTotal {
			minTotal = localTotal
		}
	}

	fmt.Println(n - minTotal)
}


// Codeforces My Practice
// author: Leonardone @ NEETSDKASU
package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	xs := make([]int, n)
	ones := 0
	for i := range xs {
		fmt.Scan(&xs[i])
		if xs[i] == 1 {
			ones++
		}
	}
	ans := ones
	zeros := 0
	for _, x := range xs {
		if x == 0 {
			zeros++
		} else {
			ones--
		}
		tmp := ones + zeros
		if tmp > ans {
			ans = tmp
		}
	}
	fmt.Println(ans)
}


package main

import (
	"fmt"
)

func sum(k, num int64) int64 {
	return num * ((k-1)+(k - num))/2 + 1
}

func run(n, k int64) {
	var i, j, mid int64
	i, j = 0, k-1
	mid = (i + j) >> 1
	if sum(k, j) < n {
		fmt.Println(-1)
		return
	}
	for i < j {
		s := sum(k, mid)
		if s >= n {
			j = mid
		} else {
			i = mid + 1
		}
		mid = (i + j) >> 1
	}
	fmt.Println(mid)
}

func main() {
	var n, k int64
	for _, err := fmt.Scanf("%d %d", &n, &k); err == nil; _, err = fmt.Scanf("%d %d", &n, &k) {
		run(n, k)
	}
}


package main

import (
	"fmt"
)

func sum(k, num int64) int64 {
	return num * k - (num - 1) * (num + 2) / 2
	//return num * ((k-1)+(k - num))/2 + 1
}

func run(n, k int64) {
	var i, j, mid int64
	i, j = 0, k
	for i < j {
		mid = (i + j) >> 1
		s := sum(k, mid)
		if s < n {
			i = mid + 1
		} else {
			j = mid
		}
	}
	mid = (i + j) >> 1
	if sum(k, mid) < n {
		fmt.Println(-1)
	} else {
		fmt.Println((i + j) >> 1)
	}
}

func main() {
	var n, k int64
	for _, err := fmt.Scanf("%d %d", &n, &k); err == nil; _, err = fmt.Scanf("%d %d", &n, &k) {
		run(n, k)
	}
}


package main

import "fmt"

func main() {
	var n, k int64
	fmt.Scanln(&n, &k)
	lo, hi := int64(0), k
	for lo <= hi {
		x := (lo + hi) >> 1
		if (k+k-x-1)*x/2+1 >= n {
			hi = x - 1
		} else {
			lo = x + 1
		}
	}
	if lo < k {
		fmt.Println(lo)
	} else {
		fmt.Println(-1)
	}
}


package main

import "fmt"

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

	for n > 0 {
		sum++
		if sum%m == 0 {
			n++
		}
		n--

	}
	fmt.Println(sum)
}


package main

import (
	"fmt"
)

func main() {
	var n, m int
	fmt.Scan(&n, &m)
	d := 0
	for ; n > 0; d++ {
		if (d+1)%m != 0 {
			n--
		}
	}
	fmt.Println(d)
}


package main
import "fmt"

var (
      n int32
      m int32
      k int32

)

func in() {
      fmt.Scanf("%d%d", &n, &m)

}

func out() {
      fmt.Println(k)
}

func run() {
      for n > 0 {
            k++
            if k % m == 0 {
                  k++
            }
            n--
      }
}

func main() {
      in()
      run()
      out()
}


package main

import (
	"fmt"
)

func intScanln(n int) ([]int, error) {
    x := make([]int, n)
    y := make([]interface{}, len(x))
    for i := range x {
        y[i] = &x[i]
    }
    n, err := fmt.Scanln(y...)
    x = x[:n]
    return x, err
}

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

	cities, err := intScanln(n)
	if err != nil {
	 fmt.Println(err)
	 return
 	}

	var crims int

	if cities[a-1] == 1 {
		crims = 1
	} else { crims = 0 }

	for dist := 1; dist < n; dist++ {
		sure := 0
		if city := a + dist -1; city < n {
			if cities[city] == 1 { sure = 1 }
		} else { sure = -1 }

		if city := a-dist -1; city >= 0 {
			if cities[city] == 1 {
				if sure == 1 { sure = 2 }
				if sure == -1 { sure = 1}
			} else { sure = 0 }
		}
		// fmt.Printf("dist: %d,\tsure = %d\n", dist, sure)
		if sure >=0 {crims += sure}
	}
	fmt.Println(crims)
}


package main

import "fmt"

func main() {
    var total int

    var n, a int
    fmt.Scan(&n, &a)

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

    f, b := a-1, a-1
    for f >= 0 || b < n {
        if  f >= 0 && b < n {
            if city[f] == 1 && city[b] == 1 {
                total += 2
                if f == b {
                    total--
                }
            }
        } else if f >= 0 && city[f] == 1 {
            total++
        } else if b < n && city[b] == 1{
            total++
        }
        f--
        b++
    }
    fmt.Print(total)
}


package main

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

func main() {
	var n, a int
	if _, err := fmt.Scanf("%d %d\n", &n, &a); err != nil {
		return
	}

	crimes := make([]bool, n)
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	for i := 0; scanner.Scan() && i < n; i++ {
		t, err := strconv.Atoi(scanner.Text())
		if err != nil {
			return
		}
		if t == 1 {
			crimes[i] = true
		} else {
			crimes[i] = false
		}
	}

	catched := 0
	for d := 0; d <= max(a-1, n-a); d++ {
		if d == 0 || d > min(a-1, n-a) {
			if a-d > 0 {
				if crimes[a-d-1] {
					catched++
				}
			} else if a+d <= n {
				if crimes[a+d-1] {
					catched++
				}
			}
		} else {
			if crimes[a-d-1] && crimes[a+d-1] {
				catched += 2
			}
		}
	}

	fmt.Println(catched)
}

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

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


package main

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

const N = 205
const INF = -1000000000

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

	n, k := io.NextInt(), io.NextInt()
	s, t := io.Next(), io.Next()
	var suff [N][26]int

	for i := n; i >= 1; i-- {
		for j := 0; j < 26; j++ {
			suff[i][j] = suff[i+1][j]
		}
		suff[i][int(s[i-1]-'a')]++
	}

	if t[0] == t[1] {
		have, cur := 0, 0
		for i := 0; i < n; i++ {
			if s[i] == t[0] {
				cur++
			} else {
				have++
			}
		}
		cur += min(have, k)
		io.Println(cur * (cur - 1) / 2)
		return
	}

	var dp [N][N][N]int
	for i := 0; i < N; i++ {
		for j := 0; j < N; j++ {
			for k := 0; k < N; k++ {
				dp[i][j][k] = -1
			}
		}
	}

	a, b := int(t[0]-'a'), int(t[1]-'a')
	_ = a

	var dfs func(int, int, int) int
	dfs = func(i, r, c int) int {
		if r < 0 {
			return INF
		}
		if i == n+1 {
			if r == 0 {
				return 0
			} else {
				return INF
			}
		}
		if dp[i][r][c] != -1 {
			return dp[i][r][c]
		}
		ans := 0
		if s[i-1] == t[0] {
			ans = dfs(i+1, r, c+1) + suff[i+1][b]
			ans = max(ans, dfs(i+1, r-1, c))
			ans = max(ans, dfs(i+1, r-1, c)+c)
		} else if s[i-1] == t[1] {
			ans = dfs(i+1, r-1, c+1) - c + suff[i+1][b]
			ans = max(ans, dfs(i+1, r, c))
			ans = max(ans, dfs(i+1, r-1, c))
		} else {
			ans = dfs(i+1, r-1, c+1) + suff[i+1][b]
			ans = max(ans, dfs(i+1, r-1, c)+c)
			ans = max(ans, dfs(i+1, r, c))
		}
		dp[i][r][c] = ans
		return ans
	}

	ans := 0
	for i := 0; i <= k; i++ {
		ans = max(ans, dfs(1, i, 0))
	}

	io.Println(ans)
}

func min(i, j int) int {
	if i > j {
		return j
	}
	return i
}

func max(i, j int) int {
	if i > j {
		return i
	}
	return j
}

type FastIO struct {
	*bufio.Reader
	*bufio.Writer
	c [1]byte
}

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

func (f *FastIO) readC() byte {
	f.Read(f.c[:])
	return f.c[0]
}

func (f *FastIO) NextInt() int {
	c := f.readC()
	for ; c <= ' '; c = f.readC() {
	}
	neg := false
	if c == '-' {
		neg = true
		c = f.readC()
	}
	n := 0
	for ; '0' <= c && c <= '9'; c = f.readC() {
		n = n*10 + int(c) - '0'
	}
	if neg {
		return -n
	}
	return n
}

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

func (f *FastIO) Next() string {
	c := f.readC()
	for ; c <= ' '; c = f.readC() {
	}
	var s []byte
	for ; c > ' '; c = f.readC() {
		s = append(s, f.c[0])
	}
	return string(s)
}

func (f *FastIO) Println(a ...interface{}) {
	fmt.Fprintln(f.Writer, a...)
}

func (f *FastIO) Print(a ...interface{}) {
	fmt.Fprint(f.Writer, a...)
}

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

func (f *FastIO) PrintlnInts(a ...int) {
	f.PrintInts(a...)
	f.Println()
}


package main

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

// github.com/EndlessCheng/codeforces-go
func CF1409F(in io.Reader, out io.Writer) {
	var n, K int
	var s, t string
	Fscan(in, &n, &K, &s, &t)
	if t[0] == t[1] {
		c := strings.Count(s, t[:1]) + K
		if c > n {
			c = n
		}
		Fprint(out, c*(c-1)/2)
		return
	}
	I := func(b bool) int {
		if b {
			return 1
		}
		return 0
	}
	max := func(a, b int) int {
		if a > b {
			return a
		}
		return b
	}

	dp := make([][][]int, n)
	for i := range dp {
		dp[i] = make([][]int, K+1)
		for j := range dp[i] {
			dp[i][j] = make([]int, n+1)
			for k := range dp[i][j] {
				dp[i][j][k] = -1
			}
		}
	}
	var f func(p, left, c0 int) int
	f = func(p, left, c0 int) (res int) {
		if p == n {
			return
		}
		dv := &dp[p][left][c0]
		if *dv >= 0 {
			return *dv
		}
		defer func() { *dv = res }()
		res = I(s[p] == t[1])*c0 + f(p+1, left, c0+I(s[p] == t[0]))
		if left > 0 {
			res = max(res, f(p+1, left-1, c0+1))
			res = max(res, c0+f(p+1, left-1, c0))
		}
		return
	}
	Fprint(out, f(0, K, 0))
}

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


package main

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

func solve() {
	n := readInt64()
	k := readString()
	values := make([]int, 0)
	for len(k) > 0 {
		var maxValue int
		var maxIndex int
		for i := len(k) - 1; i >= 0; i-- {
			value, err := strconv.ParseInt(k[i:], 10, 64)
			if err == nil {
				if value < n {
					maxValue = int(value)
					maxIndex = i
				} else {
					break
				}
			} else {
				break
			}
		}
		if maxIndex+1 < len(k) {
			if maxValue != 0 {
				for maxIndex < len(k) && k[maxIndex] == '0' {
					maxIndex++
				}
			} else if maxValue == 0 {
				maxIndex = len(k) - 1
			}
		}
		k = k[:maxIndex]
		values = append(values, maxValue)
	}
	var res int64
	for i := len(values) - 1; i >= 0; i-- {
		res *= n
		res += int64(values[i])
	}
	fmt.Println(res)
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

// IO

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

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

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


package main

import (
	"fmt"
)

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

	var a, last int
	fmt.Scanf("%d %d", &a, &last)

	diff := last - a
	isArithmetic := true

	for i := 2; i < n; i++ {
		fmt.Scanf("%d", &last)
		if last != a + i * diff {
			isArithmetic = false
		}
	}

	if isArithmetic {
		fmt.Println(a + diff * n)
	} else {
		fmt.Println(last)
	}
}


package main

import (
	"fmt"
)

func main() {
	var n int
	var arr [1000]int
	fmt.Scanf("%d\n", &n)

	for i := 0; i < n; i++ {
		fmt.Scanf("%d", &arr[i])
	}

	diff := arr[0] - arr[1]
	for i := 1; i < n - 1; i++ {
		if arr[i] - arr[i + 1] != diff {
			fmt.Printf("%d\n", arr[n-1])
			return
		}
	}

	fmt.Printf("%d\n", arr[n-1] - diff)
}


package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	t := make([]int, n, n)
	fmt.Scan(&t[0], &t[1])
	b := true
	d := t[1] - t[0]
	for i := 2; i < n; i++ {
	    fmt.Scan(&t[i])
	    if t[i] - t[i - 1] != d {
	        b = false
	    }
	}
	if b == false {
	    d = 0
	}
	fmt.Print(t[n - 1] + d)
}


package main

import "fmt"

var (
	n, input, ans, sum1, sum2 int
	mp1 map[int]int
)

func main() {
	fmt.Scanln(&n)

	mp1 = make(map[int]int)
	ans = 1

	for i := 0; i < n; i++ {
		fmt.Scan(&input)
		mp1[int(input)] = 1
		sum1 += input
	}

	for i := 0; i < n; i++ {
		fmt.Scan(&input)
		if input != 0 && mp1[int(input)] == 0 {
			ans = 0
		}
		sum2 += input
	}

	if sum1 >= sum2 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}


package main

import (
	"fmt"
)

func MaxInt(x, y int) int {
	if x > y {
		return x
	}
	return y
}
func main() {
	var n int
	fmt.Scan( &n)
	var s, x int
	s = 0
	for i := 0 ;i < n;i++{
		fmt.Scan(&x)
		s+=x
	}
	for i := 0 ;i < n;i++{
		fmt.Scan(&x)
		s-=x
	}
	if s >= 0{
		fmt.Println("Yes")
	}else{
		fmt.Println("No")
	}

}


package main

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

func main() {
	var n int
	fmt.Scanf("%d\n", &n)
	sum1 := 0
	sum2 := 0
	reader := bufio.NewReader(os.Stdin)
	s1, _ := reader.ReadString('\n')
	s2, _ := reader.ReadString('\n')

	for _, v := range strings.Fields(s1) {
		x, _ := strconv.Atoi(v)
		sum1 += x
	}
	for _, v := range strings.Fields(s2) {
		x, _ := strconv.Atoi(v)
		sum2 += x
	}

	if sum1 >= sum2 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}


package main

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

var (
	mod int64 = 1000000007
)

func range3(l int64) []int64 {
	ans := make([]int64, 3)
	ans[0] = l / 3
	ans[1] = (l + 2) / 3
	ans[2] = (l + 1) / 3
	return ans
}
func solve(l, r int64) []int64 {
	ans := range3(r)
	lans := range3(l - 1)
	for i := 0; i < 3; i++ {
		ans[i] -= lans[i]
	}
	return ans
}
func main() {
	buf := bufio.NewReader(os.Stdin)
	var n int
	var l, r int64
	fmt.Fscanf(buf, "%d %d %d\n", &n, &l, &r)

	cnt := solve(l, r)
//	fmt.Printf("cnt=%v\n",cnt)
	dp := make([][]int64, 2)
	dp[0] = make([]int64, 3)
	dp[1] = make([]int64, 3)
	f := 1
	dp[0][0] = cnt[0]
	dp[0][1] = cnt[1]
	dp[0][2] = cnt[2]
//	fmt.Printf("ans=%v\n",dp[0])
	for i := 0; i < n-1; i++ {
		pre := f^1
		for j:=0;j < 3;j++{
			dp[f][j] = 0
			for k:=0;k < 3;k++{
				to := (3+j-k)%3
				dp[f][j] += (dp[pre][k]*cnt[to])%mod
				dp[f][j] = dp[f][j]%mod
			}
		}
	//	fmt.Printf("ans=%v\n",dp[f])
		f = pre

	}
	fmt.Printf("%d\n", dp[f^1][0])

}


package main

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

const (
	modBy = int(1000000000 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n, l, r := 0, 0, 0
	fmt.Fscanf(in, "%d %d %d\n", &n, &l, &r)
	f := make([][]int64, n)
	for i := 0; i < n; i++ {
		f[i] = make([]int64, 3)
	}
	templ := l
	mod := make([]int64, 3)
	for templ <= r {
		if (r-templ+1)%3 == 0 && templ < r {
			mod[0] += int64((r - templ + 1) / 3)
			mod[1] += int64((r - templ + 1) / 3)
			mod[2] += int64((r - templ + 1) / 3)
			mod[0] %= int64(modBy)
			mod[1] %= int64(modBy)
			mod[2] %= int64(modBy)
			break
		}
		mod[templ%3]++
		templ++
	}
	//fmt.Println(mod)
	f[0][0] = mod[0]
	f[0][1] = mod[1]
	f[0][2] = mod[2]
	for i := 1; i < n; i++ {
		f[i][0] = f[i-1][0]*mod[0] + f[i-1][1]*mod[2] + f[i-1][2]*mod[1]
		f[i][1] = f[i-1][1]*mod[0] + f[i-1][0]*mod[1] + f[i-1][2]*mod[2]
		f[i][2] = f[i-1][0]*mod[2] + f[i-1][1]*mod[1] + f[i-1][2]*mod[0]
		for j := 0; j < 3; j++ {
			f[i][j] %= int64(modBy)
		}
	}
	fmt.Fprintf(out, "%d\n", f[n-1][0])
	return
}

func gcd(a, b int) int {
	if a < b {
		return gcd(b, a)
	}
	if a%b == 0 {
		return b
	}
	return gcd(b, a%b)
}

func solve(ang int) int {
	_ans := 180 / gcd(ang, 180)
	ans := _ans
	for ans*ang/180 > ans-2 {
		ans = ans + _ans
	}
	return ans
}


package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	switch n % 4 {
	case 0, 3:
		fmt.Println(0)
	default:
		fmt.Println(1)
	}
}


package main

import "fmt"

func main() {
	var n int64
	fmt.Scan(&n)
	var sum int64 = n * (n + 1) / 2
	fmt.Print(sum % 2)
}


package main

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

func main() {
	buf := bufio.NewReader(os.Stdin)
	var n int
	fmt.Fscanf(buf, "%d\n", &n)
	if n%4 == 0||n%4==3{
		fmt.Printf("0\n")
	}else if n%4==1{
		fmt.Printf("1\n")
	}else{
		fmt.Printf("1\n")
	}
}


package main

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

// github.com/EndlessCheng/codeforces-go
func CF1132F(_r io.Reader, out io.Writer) {
	var n int
	var s string
	Fscan(bufio.NewReader(_r), &n, &s)
	dp := make([][]int, n)
	for i := range dp {
		dp[i] = make([]int, n)
	}
	var f func(int, int) int
	f = func(l, r int) (res int) {
		if l > r {
			return 0
		}
		if l == r {
			return 1
		}
		dv := &dp[l][r]
		if *dv > 0 {
			return *dv
		}
		defer func() { *dv = res }()
		res = 1 + f(l+1, r)
		for i := l + 1; i <= r; i++ {
			if s[i] == s[l] {
				if r := f(l+1, i-1) + f(i, r); r < res {
					res = r
				}
			}
		}
		return
	}
	Fprint(out, f(0, n-1))
}

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


package main

import . "fmt"

// github.com/EndlessCheng/codeforces-go
func main() {
	var a, b, k int64
	Scan(&a, &b)
	if a > b {
		a, b = b, a
	}
	delta := b - a
	minLCM := int64(1e18)
	calcK := func(x int64) {
		ak := (a + x - 1) / x * x
		if lcm := ak / x * (ak + delta); lcm <= minLCM {
			minLCM = lcm
			k = ak - a
		}
	}
	for i := int64(1); i*i <= delta; i++ {
		if delta%i == 0 {
			calcK(i)
			calcK(delta / i)
		}
	}
	Print(k)
}


package main

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

// var input, inputerr = os.Open("./input")
// var output, outputerr = os.Create("./output")
// var reader = bufio.NewReader(input)
// var writer = bufio.NewWriter(output)

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

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

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

func lcm(a, b int64) int64 {
	result := a * b / gcd(a, b)

	return result
}

func main() {
	defer writer.Flush() // STDOUT MUST BE FLUSHED MANUALLY!!!
	var a, b int64
	scan(&a, &b)

	if b < a {
		a, b = b, a
	}

	if b%a == 0 {
		print(0)
		print("\n")
		return
	}

	d := b - a
	sqrtD := math.Sqrt(float64(d))
	var divs []int64
	for i := int64(1); i <= int64(sqrtD); i++ {
		if d%i == 0 {
			nxt := d / i
			divs = append(divs, i)
			if nxt != i {
				divs = append(divs, nxt)
			}
		}
	}

	lcmMin := float64(lcm(a, b))
	minK := float64(0)

	for _, q := range divs {
		if a%q != b%q {
			continue
		}
		var val float64
		k := q
		if a%q == 0 {
			val = float64(lcm(int64(a+q), int64(b+q)))
		} else {
			k = q - (a % q)
			val = float64(lcm(int64(a+k), int64(b+k)))
		}
		if val < lcmMin {
			lcmMin = val
			minK = float64(k)
		}
	}

	print(int(minK))
	print("\n")
}


package main

import (
        "fmt"
)

var (
        ax int64
        ay int64
        bx int64
        by int64
        cx int64
        cy int64
)

func main() {
        fmt.Scanf("%d %d %d %d %d %d\n", &ax, &ay, &bx, &by, &cx, &cy)
        if ((ax-bx)*(ax-bx)+(ay-by)*(ay-by)) == ((bx-cx)*(bx-cx)+(by-cy)*(by-cy)) && (bx-ax)*(cy-by) != (by-ay)*(cx-bx) {
                fmt.Printf("YES\n")
        } else {
                fmt.Printf("NO\n")
        }
}


package main

import "fmt"

func main() {
	var ax, ay, bx, by, cx, cy int64
	fmt.Scan(&ax, &ay, &bx, &by, &cx, &cy)
	cx -= bx
	cy -= by
	bx -= ax
	by -= ay
	if bx*bx+by*by == cx*cx+cy*cy && (bx != cx || by != cy) {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}


// Codeforces 785 B Anton and Classes done
package main

import (
	"bufio"
	"fmt"
	"strings"
	"strconv"
	"os"
)
var in *bufio.Reader

func readFive() (int,int,int,int,int) {
	var a [5]int
	s, err := in.ReadString('\n')
	if err != nil {
		fmt.Println("first read failure", err)
		panic(err)
	}
	ss := strings.Split(strings.Trim(s, " \n\r"), " ")
	for i:=0; i<len(ss); i++ {
		a[i], err = strconv.Atoi(ss[i])
		if err != nil {
			fmt.Println("n atoi failure", err)
			panic(err)
		}
	}
	return a[0],a[1],a[2],a[3],a[4]
}

func readLineNumbs(n int) []int {
	a := make([]int, n)
	s, err := in.ReadString('\n')
	if err != nil {
		fmt.Println("read failure", err)
		panic(err)
	}
	ss := strings.Split(strings.Trim(s, " \n\r"), " ")
	for j:=0; j<n; j++ {
		aa,err := strconv.Atoi(ss[j])
		if err != nil {
			fmt.Println("aa conv failed", err)
			panic(err)
		}
		a[j] = aa
	}
	return a
}

var ax,ay,bx,by,cx,cy int64
var haveSol bool

func readData() {
	in = bufio.NewReader(os.Stdin)
	a := readLineNumbs(6)
	ax = int64(a[0])
	ay = int64(a[1])
	bx = int64(a[2])
	by = int64(a[3])
	cx = int64(a[4])
	cy = int64(a[5])
}

func dist2(ax,ay,bx,by int64) int64 {
	dx := bx-ax
	dx = dx*dx
	dy := by-ay
	dy = dy*dy
	return dx+dy
}

func solve() {
	dab := dist2(ax,ay,bx,by)
	dbc := dist2(bx,by,cx,cy)
	if dab!=dbc {
		haveSol = false
		return
	}
	if ((ax-bx)==(bx-cx)) && ((ay-by)==(by-cy)) {
		haveSol = false
	} else {
		haveSol = true
	}
}

func printRes() {
	if haveSol {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

func main() {
	readData()
	solve()
	printRes()
}


package main

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

const (
	INF = 12345
)

func Init() {
}

func Solve(io *FastIO) {
	S := io.NextLine()

	A := []rune(S)
	N := len(A)

	best := INF
	for i := 0; i < N; i++ {
		for j := i + 1; j < N; j++ {
			if (A[i] == '0' && A[j] == '0') || (A[i] == '2' && A[j] == '5') || (A[i] == '5' && A[j] == '0') || (A[i] == '7' && A[j] == '5') {
				best = Min(best, simulate(A, i, j))
			}
			if (A[i] == '5' && A[j] == '2') || (A[i] == '0' && A[j] == '5') || (A[i] == '5' && A[j] == '7') {
				best = Min(best, simulate(A, j, i))
			}
		}
	}
	if best < INF {
		io.Println(best)
	} else {
		io.Println(-1)
	}
}

func simulate(A []rune, front, back int) int {
	N := len(A)

	X := make([]rune, N)
	copy(X, A)

	if back < front {
		front--
	}

	a := swapTo(X, back, N - 1)
	b := swapTo(X, front, N - 2)
	c := fix(X)

	// fmt.Printf("A = %v, front = %d, back = %d, a = %d, b = %d, c = %d\n", A, front, back, a, b, c)

	return a + b + c
}

func swapTo(A []rune, i, j int) int {
	cnt := 0
	for i + 1 <= j {
		A[i], A[i + 1] = A[i + 1], A[i]
		cnt++
		i++
	}
	return cnt
}

func fix(A []rune) int {
	if A[0] != '0' {
		return 0
	}
	for i := 1; i < len(A) - 2; i++ {
		if A[i] != '0' {
			return i
		}
	}
	return INF
}

func Min(args ...int) int {
	min := args[0]
	for i := 1; i < len(args); i++ {
		if args[i] < min {
			min = args[i]
		}
	}
	return min
}

type FastIO struct {
	reader *bufio.Reader
	writer *bufio.Writer
}

func (io *FastIO) NextChar() byte {
	c, _ := io.reader.ReadByte()
	return c
}

func (io *FastIO) NextInt() int {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := 1
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := 0
	for !IsSpaceChar(c) {
		res = (res * 10) + int(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextLong() int64 {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := int64(1)
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := int64(0)
	for !IsSpaceChar(c) {
		res = (res * 10) + int64(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextIntArray(size int) []int {
	return io.NextIntArrayOffset(size, 0)
}

func (io *FastIO) NextIntArrayOffset(size, offset int) []int {
	arr := make([]int, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextInt()
	}
	return arr
}

func (io *FastIO) NextLongArray(size int) []int64 {
	return io.NextLongArrayOffset(size, 0)
}

func (io *FastIO) NextLongArrayOffset(size, offset int) []int64 {
	arr := make([]int64, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextLong()
	}
	return arr
}

func (io *FastIO) NextString() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsSpaceChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) NextLine() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsLineBreakChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) Println(args ...interface{}) {
	io.writer.WriteString(fmt.Sprintln(args...))
}

func (io *FastIO) Printf(format string, args ...interface{}) {
	io.writer.WriteString(fmt.Sprintf(format, args...))
}

func (io *FastIO) FlushOutput() {
	io.writer.Flush()
}

func IsSpaceChar(c byte) bool {
	switch c {
	case 0, '\t', '\n', '\r', ' ':
		return true
	default:
		return false
	}
}

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

func main() {
	io := FastIO{reader: bufio.NewReader(os.Stdin), writer: bufio.NewWriter(os.Stdout)}
	Init()
	Solve(&io)
	io.FlushOutput()
}


package main

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

const (
	INF = 12345
)

func Init() {
}

func Solve(io *FastIO) {
	S := io.NextLine()

	A := []rune(S)
	N := len(A)

	best := INF
	for i := 0; i < N; i++ {
		for j := i + 1; j < N; j++ {
			if (A[i] == '0' && A[j] == '0') || (A[i] == '2' && A[j] == '5') || (A[i] == '5' && A[j] == '0') || (A[i] == '7' && A[j] == '5') {
				best = Min(best, simulate(A, i, j))
			}
			if (A[i] == '5' && A[j] == '2') || (A[i] == '0' && A[j] == '5') || (A[i] == '5' && A[j] == '7') {
				best = Min(best, simulate(A, j, i))
			}
		}
	}
	if best < INF {
		io.Println(best)
	} else {
		io.Println(-1)
	}
}

func simulate(A []rune, front, back int) int {
	N := len(A)

	X := make([]rune, N)
	copy(X, A)

	if back < front {
		front--
	}

	a := swapTo(X, back, N - 1)
	b := swapTo(X, front, N - 2)
	c := fix(X)

	return a + b + c
}

func swapTo(A []rune, i, j int) int {
	cnt := 0
	for i + 1 <= j {
		A[i], A[i + 1] = A[i + 1], A[i]
		cnt++
		i++
	}
	return cnt
}

func fix(A []rune) int {
	if A[0] != '0' {
		return 0
	}
	for i := 1; i < len(A) - 2; i++ {
		if A[i] != '0' {
			return i
		}
	}
	return INF
}

func Min(args ...int) int {
	min := args[0]
	for i := 1; i < len(args); i++ {
		if args[i] < min {
			min = args[i]
		}
	}
	return min
}

type FastIO struct {
	reader *bufio.Reader
	writer *bufio.Writer
}

func (io *FastIO) NextChar() byte {
	c, _ := io.reader.ReadByte()
	return c
}

func (io *FastIO) NextInt() int {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := 1
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := 0
	for !IsSpaceChar(c) {
		res = (res * 10) + int(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextLong() int64 {
	c := io.NextChar()
	for IsSpaceChar(c) {
		c = io.NextChar()
	}
	sgn := int64(1)
	if c == '-' {
		sgn = -1
		c = io.NextChar()
	}
	res := int64(0)
	for !IsSpaceChar(c) {
		res = (res * 10) + int64(c - '0')
		c = io.NextChar()
	}
	return sgn * res
}

func (io *FastIO) NextIntArray(size int) []int {
	return io.NextIntArrayOffset(size, 0)
}

func (io *FastIO) NextIntArrayOffset(size, offset int) []int {
	arr := make([]int, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextInt()
	}
	return arr
}

func (io *FastIO) NextLongArray(size int) []int64 {
	return io.NextLongArrayOffset(size, 0)
}

func (io *FastIO) NextLongArrayOffset(size, offset int) []int64 {
	arr := make([]int64, size + offset)
	for i := 0; i < size; i++ {
		arr[i + offset] = io.NextLong()
	}
	return arr
}

func (io *FastIO) NextString() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsSpaceChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) NextLine() string {
	c := io.NextChar()
	for (IsSpaceChar(c)) {
		c = io.NextChar()
	}
	var sb bytes.Buffer
	for !IsLineBreakChar(c) {
		sb.WriteByte(c)
		c = io.NextChar()
	}
	return sb.String()
}

func (io *FastIO) Println(args ...interface{}) {
	io.writer.WriteString(fmt.Sprintln(args...))
}

func (io *FastIO) Printf(format string, args ...interface{}) {
	io.writer.WriteString(fmt.Sprintf(format, args...))
}

func (io *FastIO) FlushOutput() {
	io.writer.Flush()
}

func IsSpaceChar(c byte) bool {
	switch c {
	case 0, '\t', '\n', '\r', ' ':
		return true
	default:
		return false
	}
}

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

func main() {
	io := FastIO{reader: bufio.NewReader(os.Stdin), writer: bufio.NewWriter(os.Stdout)}
	Init()
	Solve(&io)
	io.FlushOutput()
}


package main

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

// github.com/EndlessCheng/codeforces-go
func CF988E(in io.Reader, out io.Writer) {
	var s []byte
	Fscan(in, &s)
	n, ans := len(s), 99
	if n < 2 {
		Fprint(out, -1)
		return
	}
	for i := range s {
		for j := range s {
			if i == j {
				continue
			}
			t := make([]byte, n)
			copy(t, s)
			c := 0
			for k := i; k < n-1; k++ {
				t[k], t[k+1] = t[k+1], t[k]
				c++
			}
			k := j
			if j > i {
				k--
			}
			for ; k < n-2; k++ {
				t[k], t[k+1] = t[k+1], t[k]
				c++
			}
			for k = 0; t[k] == '0'; k++ {
			}
			for ; k > 0; k-- {
				t[k], t[k-1] = t[k-1], t[k]
				c++
			}
			if v, _ := strconv.Atoi(string(t[n-2:])); c < ans && v%25 == 0 {
				ans = c
			}
		}
	}
	if ans == 99 {
		ans = -1
	}
	Fprint(out, ans)
}

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


package main
import "fmt"

func main() {
	var nn, xx, yy int
	fmt.Scan(&nn, &xx, &yy)
	nn/=2
	if (nn==xx || (nn+1)==xx) && (nn==yy || nn+1==yy){
		fmt.Println("NO")
	} else {
		fmt.Println("YES")
	}
}


// 112B-mic
package main

import (
	"fmt"
)

func main() {
	var n,x,y int
	fmt.Scan(&n, &x, &y)
    if n==2 {
		fmt.Println("NO")
        return
    }else if n==4 && (y==2 || y==3) {
        fmt.Println("NO")
		return
    }else if (y==n/2 || y==(n/2)+1) && (x==n/2 || x==(n/2)+1) {
        fmt.Println("NO")
		return
	}
	fmt.Println("YES")
}


package main

import "fmt"

func main() {
    var nn,x,y int
    fmt.Scan(&nn,&x,&y)
    n := nn/2
    if ((x == n) || (x == (n+1))) && ((y == n) || (y == (n+1))) {
        fmt.Println("NO")
    } else {
        fmt.Println("YES")
    }
}


package main

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

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

func getI64() int64 {
  scanner.Scan()
  x, _ := strconv.ParseInt(scanner.Text(), 10, 64)
  return x
}
func getI() int {
  return int(getI64())
}
func getF() float64 {
  scanner.Scan()
  x, _ := strconv.ParseFloat(scanner.Text(), 64)
  return x
}
func getS() string {
  scanner.Scan()
  return scanner.Text()
}

func main() {
  scanner = bufio.NewScanner(os.Stdin)
  scanner.Split(bufio.ScanWords)
  writer = bufio.NewWriter(os.Stdout)
  defer writer.Flush()

  x := getI()
  unit := 1
  result := 0
  for x != 0 {
    result += unit * (x%10 / 3)
    unit *= 2
    x /= 10
  }
  writer.WriteString(fmt.Sprintf("%d\n", result))
}


package main

import "fmt"
import "sort"

var luckyNumberDigit [11]float64
var luckyNumber []float64

func generate(depth int) {
    if depth <= 10 {
        lucky := float64(0)
        for i := depth; i >= 0; i-- {
            lucky = lucky * 10 + float64(luckyNumberDigit[i])
        }

        if lucky != 0 {
            luckyNumber = append(luckyNumber, lucky)
        }

        if depth < 10 {
            luckyNumberDigit[depth] = 4
            generate(depth + 1)
            luckyNumberDigit[depth] = 7
            generate(depth + 1)
            luckyNumberDigit[depth] = 0
        }
    }
}

func main () {
    luckyNumber = make([]float64, 0, 1000000)
    generate(0)

    sort.Float64s(luckyNumber)

    n := 0
    fmt.Scanf("%d\n", &n)
    fmt.Println(sort.SearchFloat64s(luckyNumber, float64(n)) + 1)
}


package main

import "fmt"

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

	// posición en su grupo de cifras
	pos := 0
	for i := 0; i < len(s); i++ {
		pos *= 2
		if s[i] == '7' {
			pos++
		}
	}

	// sumamos los de menos cifras
	less := 0
	for i := 1; i < len(s); i++ {
		less |= (1 << uint(i))
	}
	fmt.Printf("%d\n", (1 + pos + less))
}


package main

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

func I(i ...interface{}) error {
	_, err := fmt.Fscan(r, i...)
	return err
}

func O(o ...interface{}) {
	fmt.Fprint(w, o...)
}

func readInt() int {
	var o, neg bool
	var i int
	b, err := r.ReadByte()
	for err == nil {
		if b != ' ' && b != '\n' && b != '\r' {
			if b == '-' {
				neg = true
			} else {
				i = i*10 + int(b) - 48
				o = true
			}
		} else if o {
			break
		}
		b, err = r.ReadByte()
	}
	if neg {
		return -i
	}
	return i
}

func writeInt(i int) {
	if i < 0 {
		w.WriteByte('-')
		i = -i
	}
	if i < 10 {
		w.WriteByte(byte(i + 48))
		return
	}
	var tmp, count int
	tmp = i
	for tmp%10 == 0 {
		tmp /= 10
		count++
	}
	tmp = 0
	for i != 0 {
		tmp = tmp*10 + (i % 10)
		i /= 10
	}
	for tmp != 0 {
		w.WriteByte(byte((tmp % 10) + 48))
		tmp /= 10
	}
	for count > 0 {
		count--
		w.WriteByte('0')
	}
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func init() {
	if f, err := os.Open("in.goC"); err == nil {
		r = bufio.NewReader(f)
	} else {
		r = bufio.NewReader(os.Stdin)
	}
	w = bufio.NewWriter(os.Stdout)
}

func main() {
	var n int
	for I(&n) == nil {
		solve(n)
	}
	w.Flush()
}

func solve(n int) {
	var in [3][6]int
	var arr []int
	o := make(map[int]bool)
	o[0] = true
	for i := 0; i < n; i++ {
		for j := range in[i] {
			in[i][j] = readInt()
			if _, exists := o[in[i][j]]; !exists {
				arr = append(arr, in[i][j])
				o[in[i][j]] = true
			}
		}
	}
	for i := 0; i < 6; i++ {
		for j := 0; j < 6; j++ {
			for k := 0; k < 6; k++ {
				if n == 3 {
					a := in[0][i]*100 + in[1][j]*10 + in[2][k]
					b := in[0][i]*100 + in[2][j]*10 + in[1][k]
					c := in[2][i]*100 + in[0][j]*10 + in[1][k]
					d := in[1][i]*100 + in[0][j]*10 + in[2][k]
					e := in[1][i]*100 + in[2][j]*10 + in[0][k]
					f := in[2][i]*100 + in[1][j]*10 + in[0][k]
					if _, exists := o[a]; !exists {
						arr = append(arr, a)
						o[a] = true
					}
					if _, exists := o[b]; !exists {
						arr = append(arr, b)
						o[b] = true
					}
					if _, exists := o[c]; !exists {
						arr = append(arr, c)
						o[c] = true
					}
					if _, exists := o[d]; !exists {
						arr = append(arr, d)
						o[d] = true
					}
					if _, exists := o[e]; !exists {
						arr = append(arr, e)
						o[e] = true
					}
					if _, exists := o[f]; !exists {
						arr = append(arr, f)
						o[f] = true
					}
				}
				if n > 1 {
					aa := in[0][i]*10 + in[1][j]
					bb := in[1][i]*10 + in[0][j]
					cc := in[0][i]*10 + in[2][j]
					dd := in[2][i]*10 + in[0][j]
					ee := in[2][i]*10 + in[1][j]
					ff := in[1][i]*10 + in[2][j]
					if _, exists := o[aa]; !exists {
						arr = append(arr, aa)
						o[aa] = true
					}
					if _, exists := o[bb]; !exists {
						arr = append(arr, bb)
						o[bb] = true
					}
					if n == 3 {
						if _, exists := o[cc]; !exists {
							arr = append(arr, cc)
							o[cc] = true
						}
						if _, exists := o[dd]; !exists {
							arr = append(arr, dd)
							o[dd] = true
						}
						if _, exists := o[ee]; !exists {
							arr = append(arr, ee)
							o[ee] = true
						}
						if _, exists := o[ff]; !exists {
							arr = append(arr, ff)
							o[ff] = true
						}
					}
				}
			}
		}
	}
	sort.Ints(arr)
	if arr[0] != 1 {
		O("0\n")
		return
	}
	for i := range arr {
		if i+1 != arr[i] {
			O(i, "\n")
			return
		}
	}
	O(arr[len(arr)-1], "\n")
}


package main

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

var res map[string]bool

func solve() {
	res = make(map[string]bool)
	n := readInt()
	a := make([]string, n)
	for i := 0; i < n; i++ {
		str := make([]byte, 6)
		for j := 0; j < 6; j++ {
			str[j] = byte(readInt() + '0')
		}
		a[i] = string(str)
	}
	cnt := 0
	perm(a, 0)
	for i := 1; i < 1000; i++ {
		if _, ok := res[strconv.Itoa(i)]; !ok {
			break
		}
		cnt++
	}
	fmt.Println(cnt)
}

func dfs(a []string, pos int, prefix string) {
	if len(prefix) > 0 {
		res[prefix] = true
	}
	if pos == len(a) {
		return
	}
	for i := 0; i < 6; i++ {
		if len(prefix) == 0 && a[pos][i] == '0' {
			continue
		}
		dfs(a, pos+1, prefix+string(a[pos][i]))
	}
}

func perm(a []string, from int) {
	if from+1 == len(a) {
		dfs(a, 0, "")
		return
	}
	for i := from; i < len(a); i++ {
		a[from], a[i] = a[i], a[from]
		perm(a, from+1)
		a[from], a[i] = a[i], a[from]
	}
}

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

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

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

// IO

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

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

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


package main

import "fmt"

func main() {
	var n int
	var nums [10][3]bool
	_, _ = fmt.Scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		for j := 0; j < 6; j++ {
			var num int
			if j < 5 {
				_, _ = fmt.Scanf("%d", &num);
			} else {
				_, _ = fmt.Scanf("%d\n", &num);
			}
			nums[num][i] = true
		}
	}
	for i := 1; i < 100; i++ {
		if i < 10 {
			if !nums[i][0] && !nums[i][1] && !nums[i][2] {
				fmt.Println(i - 1)
				return
			}
		} else {
			first := i % 10
			second := i / 10
			if (!nums[first][0] || !nums[second][1]) &&
				(!nums[first][0] || !nums[second][2]) &&
				(!nums[first][1] || !nums[second][0]) &&
				(!nums[first][1] || !nums[second][2]) &&
				(!nums[first][2] || !nums[second][1]) &&
				(!nums[first][2] || !nums[second][0]) {
				fmt.Println(i - 1)
				return
			}

		}
	}
	fmt.Println(99)
}


package main

import (
  "os"
  "bufio"
  "strconv"
  "fmt"
  "math/big"
)

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

func getI64() int64 {
  scanner.Scan()
  x, _ := strconv.ParseInt(scanner.Text(), 10, 64)
  return x
}
func getI() int {
  return int(getI64())
}
func getF() float64 {
  scanner.Scan()
  x, _ := strconv.ParseFloat(scanner.Text(), 64)
  return x
}
func getS() string {
  scanner.Scan()
  return scanner.Text()
}

func main() {
  scanner = bufio.NewScanner(os.Stdin)
  scanner.Split(bufio.ScanWords)
  writer = bufio.NewWriter(os.Stdout)
  defer writer.Flush()

  zero := big.NewRat(0, 1)
  one := big.NewRat(1, 1)
  two := big.NewRat(2, 1)

  n, limit := getI(), getI()
  filled := make([][]*big.Rat, n)
  for r := range filled {
    filled[r] = make([]*big.Rat, r + 1)
    for c := range filled[r] {
      filled[r][c] = big.NewRat(0, 1)
    }
  }
  count := 0
  maxCount := (n + 1) * n / 2

  for t := 0; t < limit; t++ {
    pours := make([]*big.Rat, 1)
    pours[0] = big.NewRat(1, 1)
    for r := 0; r < n; r++ {
      allZero := true
      for _, pour := range pours {
        if pour.Cmp(zero) != 0 {
          allZero = false
          break
        }
      }
      if allZero {
        break
      }
      nextPours := make([]*big.Rat, r + 2)
      for i := range nextPours {
        nextPours[i] = big.NewRat(0, 1)
      }
      for c, pour := range pours {
        x := &big.Rat{}
        x.Add(filled[r][c], pour)
        if filled[r][c].Cmp(one) < 0 && x.Cmp(one) >= 0 {
          count++
          if count == maxCount {
            writer.WriteString(fmt.Sprintf("%d\n", count))
            return
          }
        }
        if x.Cmp(one) <= 0 {
          filled[r][c].Set(x)
          continue
        }
        pour.Sub(pour, one)
        pour.Add(pour, filled[r][c])
        filled[r][c].Set(one)
        pour.Quo(pour, two)
        nextPours[c].Add(nextPours[c], pour)
        nextPours[c + 1].Add(nextPours[c + 1], pour)
      }
      pours = nextPours
    }
  }

  writer.WriteString(fmt.Sprintf("%d\n", count))
}


package main

import (
	"fmt"
	"os"
)

var one = int64(0x10000)

func progressRow(p [][]int64, row int) (spill bool) {
	spill = false
	for i := 0; i <= row; i++ {
		if p[row][i] > one {
			spill = true
			diff := p[row][i] - one
			diff >>= 1
			p[row+1][i] += diff
			p[row+1][i+1] += diff
			p[row][i] = one
		}
	}
	return spill
}

func progress(p [][]int64, n int) {
	p[0][0] += one
	for i := 0; i < n; i++ {
		spill := progressRow(p, i)
		if !spill {
			return
		}
	}
}

func solve(n, t int) int {
	p := make([][]int64, n+1)
	for i := 0; i <= n; i++ {
		p[i] = make([]int64, i+1)
	}
	for i := 0; i < t; i++ {
		progress(p, n)
	}
	count := 0
	for i := 0; i < n; i++ {
		for j := 0; j < i+1; j++ {
			if p[i][j] >= one {
				count++
			}
		}
	}
	return count
}

func main() {
	var n, t int
	nr, err := fmt.Fscanln(os.Stdin, &n, &t)
	if nr != 2 || err != nil {
		panic(err)
	}
	res := solve(n, t)
	fmt.Println(res)
}


// Codeforces 676 B
package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
	"strconv"
)
var in *bufio.Reader

func readFive() (int,int,int,int,int) {
    var a [5]int
	s, err := in.ReadString('\n')
	if err != nil {
		fmt.Println("first read failure", err)
		panic(err)
	}
	ss := strings.Split(strings.Trim(s, " \n\r"), " ")
    for i:=0; i<len(ss); i++ {
        a[i], err = strconv.Atoi(ss[i])
        if err != nil {
            fmt.Println("n atoi failure", err)
            panic(err)
        }
    }
    return a[0],a[1],a[2],a[3],a[4]
}

func readLineNumbs(n int) []int {
    a := make([]int, n)
    s, err := in.ReadString('\n')
    if err != nil {
        fmt.Println("read failure", err)
        panic(err)
    }
    ss := strings.Split(strings.Trim(s, " \n\r"), " ")
    for j:=0; j<n; j++ {
        aa,err := strconv.Atoi(ss[j])
        if err != nil {
            fmt.Println("aa conv failed", err)
            panic(err)
        }
        a[j] = aa
    }
    return a
}

var n int
var t int
var res int

func readData() {
 	in = bufio.NewReader(os.Stdin)
	// reading n
    n,t,_,_,_ = readFive()
    //fmt.Printf("n,t = %d %d\n", n,t)
}

func solve() {
    var drob int64
    drob = 1<<24
    aa := make([]int64, n+2)
    an := make([]int64, n+2)
    aa[0] = int64(t)*drob
    countFull := 0
    for i:=0; i<n; i++ {
        // print a
        //fmt.Print(i)
        for j:=0; j<n+1; j++ {
            //fmt.Printf(" %12d ", aa[j])
        }
        //fmt.Println()
        // clear an
        for j:=0; j<=n; j++ {
            an[j] = 0.0;
        }
        for j:=0; j<=n; j++ {
            if aa[j] >= drob {
                countFull ++
                v := aa[j]
                v = (v-drob)/2
                //fmt.Printf("a,v= %f %f\n",aa[j], v)
                an[j] += v
                an[j+1] += v
            }
        }
        // copy an -> a
         for j:=0; j<n+1; j++ {
             aa[j] = an[j]
        }
    }
    res = countFull
}

func main() {
 	readData()

    solve()

    // print aqnswer
    fmt.Println(res)
}


package main

import (
	"fmt"
)

func main() {
	var n int
	if _, err := fmt.Scanf("%d\n", &n); err != nil {
		return
	}

	doors := int64(0)
	for i := 1; i <= n; i++ {
		doors += (2 << uint(i-1))
	}

	fmt.Println(doors)
}


package main

import (
	"fmt"
)

func pow(a, b int64) int64 {
	if b <= 0 {
		return 1
	}
	if b <= 1 {
		return a
	}
	return a + pow(a*2, b-1)
}

func main() {
	var b int64
	fmt.Scan(&b)
	fmt.Println(pow(2, b))
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var i, n, total int64

	fmt.Scanf("%d", &n)

	for i = 1; i <= n; i++ {
		total += int64(math.Pow(2.0, float64(i)))
	}
	fmt.Println(total)
}


package main

import "fmt"

type Combination struct {
	n int
	f *Factorial
}

func NewCombination(n int, m int64) *Combination {
	f := NewFactorial(n, m)
	return &Combination{n, f}
}

func (c *Combination) Combination(n, k int) int64 {
	return c.f.F[n] * c.f.Inv[k] % c.f.Mod * c.f.Inv[n-k] % c.f.Mod
}

func (c *Combination) Permutation(n, k int) int64 {
	return c.Combination(n+k-1, n-1)
}

func (c *Combination) Factorial(n int) int64 {
	return c.f.F[n]
}

type Factorial struct {
	n      int
	Mod    int64
	F, Inv []int64
}

func NewFactorial(n int, m int64) *Factorial {
	f := Factorial{n, m, nil, nil}
	f.F = make([]int64, n+1)
	f.Inv = make([]int64, n+1)
	f.F[0] = 1
	for i := 1; i <= n; i++ {
		f.F[i] = f.F[i-1] * int64(i) % f.Mod
	}
	f.Inv[n] = pow(f.F[n], f.Mod-2, f.Mod)
	for i := n; i > 0; i-- {
		f.Inv[i-1] = f.Inv[i] * int64(i) % f.Mod
	}
	return &f
}

func pow(x, n, m int64) int64 {
	if n == 0 {
		return 1
	}
	if n&1 == 0 {
		r := pow(x, n/2, m)
		return r * r % m
	}
	return x * pow(x, n-1, m) % m
}

func div(x, n, m int64) int64 {
	return x * pow(n, m-2, m) % m
}

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

	var ans int64
	var m int64
	m = 998244353
	c := NewCombination(n, m)
	for i := 1; i <= n; i++ {
		rest := n/i - 1
		if rest < k-1 {
			continue
		}
		ans += c.Combination(rest, k-1)
		ans %= m
	}
	fmt.Println(ans)
}


package main

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

// github.com/EndlessCheng/codeforces-go
func CF1359E(in io.Reader, out io.Writer) {
	const mod int64 = 998244353
	const mx int = 5e5
	F := [mx + 1]int64{1}
	for i := 1; i <= mx; i++ {
		F[i] = F[i-1] * int64(i) % mod
	}
	pow := func(x, n int64) int64 {
		res := int64(1)
		for ; n > 0; n >>= 1 {
			if n&1 == 1 {
				res = res * x % mod
			}
			x = x * x % mod
		}
		return res
	}
	invF := [...]int64{mx: pow(F[mx], mod-2)}
	for i := mx; i > 0; i-- {
		invF[i-1] = invF[i] * int64(i) % mod
	}
	C := func(n, k int) int64 { return F[n] * invF[k] % mod * invF[n-k] % mod }

	var n, k int
	Fscan(in, &n, &k)
	ans := int64(0)
	for i := 1; n/i >= k; i++ {
		ans += C(n/i-1, k-1)
	}
	Fprint(out, ans%mod)
}

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