jiahuimbzuai/CoQuIR huggingface dataset:
//  [python]
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353
r = int(sys.stdin.readline())
print(int(r**2))
//  [java]
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Random r = new Random();
        int n = 10000000;
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = r.nextInt();
        }
        Arrays.parallelSort(a);
        solve();
    }

    public static void solve() {
        Scanner sc = new Scanner(System.in);
        int r = sc.nextInt();
        System.out.println(r * r);
        sc.close();
    }
}
//  [java]
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Random r = new Random();
        int n = 10000000;
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = r.nextInt();
        }
        Arrays.sort(a);
        solve();
    }

    public static void solve() {
        Scanner sc = new Scanner(System.in);
        int r = sc.nextInt();
        System.out.println(r * r);
        sc.close();
    }
}
//  [java]

import java.util.Scanner;

public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int r = scanner.nextInt();
        System.out.println(r * r);
    }
}
//  [cpp]
// AtCoder template
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i = 0; i < n; ++i)

// merge-sort
// As we define n is the size of list, calculation will take O(nlogn) time.
template<typename T>
void m_sort(vector<T> &list){
    
    if(list.size() <= 1) return; // 終了条件

    int n = list.size();
    
    vector<T> m1,m2;
    for(int i = 0; i < n; ++i){
        if(i%2) m1.push_back(list[i]);
        else m2.push_back(list[i]);
    }
    
    m_sort(m1);
    m_sort(m2);

    for(int i = 0, m1_cnt = 0, m2_cnt = 0; i < n; ++i){
        if(m1_cnt == m1.size()) list[i] = m2[m2_cnt++];
        else if(m2_cnt == m2.size()) list[i] = m1[m1_cnt++];            
        else{
            if(m1[m1_cnt] < m2[m2_cnt]) list[i] = m1[m1_cnt++];
            else list[i] = m2[m2_cnt++];
        }
    }

}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    
    vector<int> a(100000);
    rep(i,100000) a[i] = 100000-i;
    m_sort(a);

    int r; cin >> r;
    cout << r*r << endl;

}
//  [cpp]
#include<iostream>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <iomanip>//setprecision
#include<math.h>
#include <functional>
#include<climits>
using namespace std;
#define ll  long long 
#define rep(i, n)        for(ll i=0; i<(ll)(n); ++i)
#define mod 1000000007
  vector<ll>to[1000005];
int main(){
  ll a;cin>>a;
  cout<<a*a;
}
//  [c]
 #include<stdio.h>
 int main(){
 int r;
 scanf("%d",&r);
 printf("%d\n",r*r);
 }
//  [c]
#include<stdio.h> 
int main(void)
{
  int a;scanf("%d",&a);printf("%d\n",a*a);
  return 0;
}
//  [c]
#include <stdio.h>

int main()
{
  int r;

  scanf("%d",&r );
  printf("%d",r*r);
  
  return 0;
}
//  [javascript]
function main(input) {
    const A = parseInt(input, 10);
	console.log(A*A);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
"use strict";
var GET=(function(){function f(s){return new g(s);}function g(s){this._s=s.trim().split("\n");this._y=0;}g.prototype.a=function(f){var s=this._s, y=this._y, r;if(typeof s[y]==="string")s[y]=s[y].split(" ").reverse();r=s[y].pop();if(!s[y].length)this._y++;return f?r:+r;};g.prototype.l=function(f){var s=this._s[this._y++].split(" ");return f?s:s.map(a=>+a);};g.prototype.m=function(n,f){var r=this._s.slice(this._y,this._y+=n).map(a=>a.split(" "));return f?r:r.map(a=>a.map(a=>+a));};g.prototype.r=function(n,f){var r=this._s.slice(this._y,this._y+=n);return f?r:r.map(a=>+a);};return f;})();
var o=GET(require("fs").readFileSync("/dev/stdin","utf8"));
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill(0).map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill(0).map(x=>"+r+")";return eval(r);}

console.log(main());
function main(){
  var n = o.a();
  return n*n;
}
//  [javascript]
'use strict';
const main = input => {
  input = parseInt(input[0]);
  console.log(input*input);
  
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));
//  [go]
package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	scanner.Scan()

	r, err := strconv.Atoi(scanner.Text())
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(r * r)
}
//  [go]
package main

import (
	"fmt"
)

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

	fmt.Println(r * r)
}
//  [ruby]
puts gets.to_i ** 2
//  [ruby]
p gets.to_i**2
//  [ruby]
r = gets.to_i

puts (r * r)
//  [swift]
import Foundation
 
let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ")
 
var r = Int(split[0])!
    
print(r*r)
//  [swift]
import Foundation




let r = Int(readLine()!)!
print(r * r)
//  [swift]
import Foundation

class Scanner {
    static func readInt() -> Int {
        return Int(readLine()!)!
    }
    
    static func readIntArr() -> [Int] {
        return readLine()!.split(separator: " ").map { Int($0)! }
    }
    
    static func readM(_ n: Int) -> [[Int]] {
        var res = [[Int]]()
        for _ in 0..<n {
            res.append(readIntArr())
        }
        return res
    }
    
    static func readUknownIntMat() -> [[Int]] {
        var res = [[Int]]()
        while let line = readLine() {
            res.append(line.split(separator: " ").map { Int($0)! })
        }
        return res
    }
    
    static func readString() -> String {
        return readLine()!
    }
}

class Printer {
    static func printIntArray(_ arr: [Int]) {
        print(arr.map { String($0) }.joined(separator: " "))
    }
}

let n = Scanner.readInt()
print(n*n)
//  [typescript]
{
  type Print = void | string | number | string[] | number[];
  const outs: Print[] = [];
  const _io = (i = 0) => {
    // eslint-disable-next-line @typescript-eslint/no-var-requires
    const str = require("fs").readFileSync("/dev/stdin", "utf8");
    const lines = str.trim().split("\n");
    const s = () => lines[i++] || "";
    const n = () => Number(s());

    const mn = (v: string[]) => v.map(Number);
    const sp = (v: string) => v.split(" ");

    const ss = () => sp(s());
    const nn = () => mn(ss());
    const nls = () => mn(lines.slice(i));
    const nnls = () => lines.slice(i).map((v: string) => mn(sp(v)));

    return { lines, s, n, ss, nn, nls, nnls };
  };
  const main = (): Print => {
    const r = _io();
    const [s] = r.ss();
    // 以下入れ替え
    return getMultipleOne(Number(s));
  };
  /**
   * get how many times as one circle area
   *
   * @param radius - The circle area
   * @returns how many times as one circle area
   *
   */
  const getMultipleOne = (radius: number): number => {
    return (radius * radius) / 1;
  };

  outs.push(main());

  console.log(
    outs
      .map((line) => (typeof line === "object" ? line.join(" ") : String(line)))
      .join("\n")
  );
}
//  [typescript]
"use strict";

const main = arg => {
  const input = arg.trim().split("\n");

  const R = parseInt(input[0]);
  console.log(R * R);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
const main = (input) => {
  const r = Number(input.trim());
  console.log(r**2);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [python]
import numpy as np
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

N = ii()
x = lmis()

for i in np.argsort(x):
    print(i+1,end=" ")
//  [python]
N = int(input())
A = list(map(int, input().split()))
B = [0]*N

for i in range(len(A)):
    B[A[i]-1] = i+1

s = ""
for i in B:
    s = s + str(i) + " "

print(s.strip())
//  [python]
n = int(input())
a = list(map(int, input().split()))

dic = {}
ans = ''
for i in range(n):
    dic[a[i]] = i+1

for i in range(n):
    ans = ans + str(dic[i+1]) + ' '

print(ans)
//  [java]

import java.util.*;
import java.lang.*;
import java.util.stream.Collectors;


class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        Map<Integer, Integer> map = new HashMap<>();

        for (Integer i = 1; i <= N; i++)
            map.put(i, sc.nextInt());

        Map<Integer, Integer> result = map.entrySet().stream()
                .sorted(Map.Entry.<Integer, Integer>comparingByValue()
                        .thenComparing(Map.Entry.comparingByKey()))
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));

        for (Map.Entry<Integer, Integer> sorted : result.entrySet()) {
            System.out.printf("%d ", sorted.getKey());
        }

    }
}
//  [java]
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner stdin = new Scanner(System.in);

        int N = stdin.nextInt();
        int A[] = new int[N+1];
        int ans[] = new int[N+1];

        for(int i=1;i<=N;i++) {
        	A[i] = stdin.nextInt();
        }
        for(int i=1;i<=N;i++) {
        	ans[A[i]] = i;
        }
        for(int i=1;i<=N;i++) {
        	System.out.printf("%d ", ans[i]);
        }
    }
}
//  [java]
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] a) {
        Scanner scan = new Scanner(System.in);
        int stuNum = scan.nextInt();
        Map<Integer, Integer> numMap = new HashMap<>();
        for (int i = 1; i < stuNum + 1; i++) {
            int s = scan.nextInt();
            int dis = stuNum - s;
            numMap.put(stuNum - dis, i);
        }
        for (int j = 1; j < numMap.size() + 1; j++) {
            System.out.printf("%d ", numMap.get(j));
        }
    }
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin>>n;
    vector<int> a(n);
    for(int i=0;i<n;i++)cin>>a[i];
    for(int i=0;i<n;i++){
        for(int j=0;i<n;j++){
            if(a[j]==i+1){cout<<j+1<<" ";break;} 
        }
    }
    
}
//  [cpp]
#include <iostream>
#include<vector>
#include <math.h>
#include<stdio.h>
#include <climits>
#include<algorithm>
#include<string>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)


int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	vector<int>a;//入力
	int x = 0, n;
	int i = 0, j = 0, in; //内部で使用;
	int ans = 0; //出力

	cin >> n;
	while (cin >> in) {
		a.push_back(in);
	}

	rep(i, n) {
		while (a[j] != i + 1) {
			j++;
		}
		cout << j+1 <<" " ;
		j = 0;
	}
	cout << "\n";
}
//  [cpp]
#include<iostream>
using namespace std;
int main()
{
    long  int n,*a,i,j,temp,*index,temp_index;
    cin>>n;
    a=new long int[n];
    index=new long int[n];
    for(i=0;i<n;i++)
    {
	    cin>>a[i];
	    index[i]=i;
    }  
    for(i=1;i<n;i++)
    {
        j=i-1;
	temp=a[j+1];
	temp_index=index[j+1];
	while(j>=0&&a[j]>temp)
	{
		a[j+1]=a[j];
		index[j+1]=index[j];
		j--;
	}
	a[j+1]=temp;
	index[j+1]=temp_index;
    }

    for(i=0;i<n;i++)
	    cout<<index[i]+1<<" ";
    
}
//  [c]
#include<stdio.h>
#include<stdlib.h>

int main(){

	int N;
	scanf("%d", &N);

	int A[N];
	for( int i=0; i<N; i++ ){
		scanf("%d", &A[i]);
	}

	int ans[N];
	for( int j=1; j<=N; j++ ){
		int k=0;
		int count=0;
		do{
			count++;
			k++;
		}while( A[k-1]!=j );

		ans[j-1] = count;
	}	

	for( int l=0; l<N; l++ ){
		printf("%d ", ans[l]);
	}

	return 0;
}
//  [c]
#include<stdio.h>
int main(void){
    int a;
    int ans[100001];
    int turn[100001];
    int num=1;
    int flag=0;

    scanf("%d",&a);

    for(int i=0;i<a;i++){
        scanf("%d",&turn[i]);
    }
    for(num=1;num<=a;num++){
        flag=0;
        int n=0;
    while(flag==0){
        if(turn[n]==num){
            ans[num-1]=n+1;
            flag=1;
        }
        n++;
    }
    }
    for(int m=0;m<a-1;m++){
        printf("%d ",ans[m]);
    }
    printf("%d\n",ans[a-1]);
    return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define rep(i,n) for(int i=0;i<n;i++)
int gcd(int a, int b){
    int r=1;
    while(r!=0){
        r=a%b;
        a=b;
        b=r;
    }
    return a;
}
void revStr(char* str){
    int size = strlen(str);
    int i,j;
    char tmp = {0};
    for(i = 0, j = size - 1; i < size / 2; i++, j--){
        tmp = str[i];
        str[i] = str[j];
        str[j] = tmp;
    }return;
}
struct data{
    int a,b,c;
};

//昇順
int compare_int(const void *a, const void *b)
{
    return *(int*)a - *(int*)b;
}
#define MAXSIZE 200000
int list[MAXSIZE];
int tail;

void Init(void){
    tail=0;
}
int Top(void){
    return 0;
}

int Next(int pos){
    if(pos<tail-1){
        return pos+1;
    }else{
        return -1;
    }
}
int Count(void){
    return tail;
}

int Item(int pos){
    if((pos>=0)&&(pos<tail)){
        return list[pos];
    }else{
        return 0;
    }
}
void Add(int value){
    if(tail<MAXSIZE){
        list[tail]=value;
        tail++;
    }
}
void Delete(int pos){
    if((pos>=0)&&(pos<tail)){
        int i;
        for(i=pos;i<tail-1;i++){
            list[i]=list[i+1];
        }
        tail--;
    }
}

int main(){
    int N;
    scanf("%d",&N);
    int st[N];
    for(int i=0;i<N;i++){
        scanf("%d",&st[i]);
    }
    for(int i=1;i<=N;i++){
        for(int j=0;j<N;j++){
            if(i==st[j]){
                printf("%d ",j+1);
                break;
            }else{
                ;
            }
        }
    }
}
//  [javascript]
'use strict'
const main = input => {
  const n = parseInt(input[0], 10), a = input[1].split(' ').map(val => parseInt(val, 10));
  // console.log(n, a);
  let rev = new Array(n);
  for(let i = 0; i < n; i++) {
    rev[a[i]-1] = i+1;
  }
  rev.map(val => console.log(val)
  );
  
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));
//  [javascript]
function Main(input) {
  input = input.split('\n');

  N = parseInt(input[0], 10);
  A = input[1].split(' ');

  var S = Array(N + 1);
  for(var x = 0; x < N; x++) {
    S[A[x]] = x + 1;
  }
  S.shift();

  for(var x = 0; x < N; x++) {
    console.log(S[x]);
  }


}
Main(require('fs').readFileSync('/dev/stdin', 'utf-8'));
//  [javascript]
function Main(input){
  
  input = input.split("\n");
  N = parseInt(input[0]);
  A = input[1].split(" ");
  var S = Array(N+1);
  for(var x=0;x<N;x++){
    S[A[x]] = x;
  }
  S.shift();
    
  for(var x=0;x<N;x++){
    console.log(S[x]+1);
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"fmt"
	"strconv"
)

func main() {
	var n int
	fmt.Scan(&n)
	a := map[string]int{}
	for i := 1; i <= n; i++ {
		var tmp int
		fmt.Scan(&tmp)
		a[strconv.Itoa(tmp)] = i
	}

	for i := 1; i <= n; i++ {
		fmt.Print(a[strconv.Itoa(i)])
		fmt.Print(" ")
	}
	fmt.Println()
}
//  [go]
package main

import (
	"fmt"
	"sort"
)

type Pair struct {
	Index int
	Value int
}

type Pairs []Pair

func (p Pairs) Len() int {
	return len(p)
}

func (p Pairs) Swap(i, j int) {
	p[i], p[j] = p[j], p[i]
}

func (p Pairs) Less(i, j int) bool {
	return p[i].Value < p[j].Value
}

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

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

	sort.Sort(arr)

	for i, p := range arr {
		if i != 0 {
			fmt.Print(" ")
		}
		fmt.Print(p.Index)
	}
	fmt.Println("")
}
//  [go]
package main
import (
	"fmt"
)
func main(){
	var n, i int
	fmt.Scan(&n)
	a:=make([]int, n)
	b:=make([]int, n)
	for i=0;i<n;i++{
		fmt.Scan(&a[i])
	}
	for i=0;i<n;i++{
		b[a[i]-1]=i+1
	}
	for i=0;i<n;i++{
		fmt.Print(b[i])
		fmt.Print(" ")
	}
}
//  [ruby]
def my_bsearch (array,target)
  head=0
  tail=array.length-1
  while head<=tail
    center=(tail+head)/2
    if array[center][0] == target
      return center
    elsif array[center][0] < target
      head = center + 1
    else
      tail = center - 1
    end
  end
  #puts "now head=#{head}, tail=#{tail}\narr[#{head}]=#{array[head]}, arr[#{tail}]=#{array[tail]}, target=#{target}"
  if tail==-1 
    return 0
  elsif head==array.length 
    return array.length
  end
  if array[tail][0]<=target
    return tail+1
  else 
    return head-1
  end
end


n = gets.chomp.to_i
a = gets.chomp.split(" ").map{|i|i = i.to_i}
arr = []
now_pos = 0
head=0
tail=0
a.each_with_index{|elm,i|
  #puts "#{elm}, #{i}"
  if arr == [] 
    arr<<[elm,i]
  elsif arr.length==1
    if arr[0][0] <=elm
      arr<<[elm,i]
    else
      arr.insert(0,[elm,i])
    end
  else
    # 挿入箇所にぶたん
    arr.insert(my_bsearch(arr,elm),[elm,i])
  end
  #puts "now arr = #{arr}"
}
#pp arr
b=[]
arr.each{|elm|
  b<<elm[1]+1
}
puts b.join(" ")
//  [ruby]
n = gets.chomp("").to_i
a = gets.split(" ").map(&:to_i)

ans = Hash.new
n.times do |i|
  ans[a[i]] = i+1
end

ans = ans.sort

ans.each_with_index do |value, s|
  if s != 0
    print " "
  end
  print value[1]
end
//  [ruby]
n = gets.to_i
a = gets.chomp.split(" ").map(&:to_i)
s = {}

for i in 0..n-1
  s[a[i]] = i+1
end

s.sort.each do |value|
  print value[1]
  if value[0] != n
    print " "
  end
end
//  [rust]
use text_io::*;
use std::collections::*;
use std::process::exit;

fn main() {
    let mut n:usize = read!();
    let mut v = HashMap::new();
    for i in 0..n {
        let x:usize = read!();
        v.insert(x,i+1);
    }
    for i in 1..n+1 {
        let c: &usize = v.get(&i).unwrap();
        println!("{}",c);
    }
}
//  [rust]
use std::io::Read;

fn read<T: std::str::FromStr>() -> T {
    let stdin = std::io::stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let n: usize = read();
    let a: Vec<u32> = (0..n).map(|_| read()).collect();

    let mut w: Vec<(u32, usize)> = vec![(0, 0); n];
    for i in 0..n {
        w[i] = (a[i], i);
    }
    w.sort();
    for (_, i) in w {
        println!("{}", i + 1);
    }
}
//  [rust]
macro_rules! input {
    ( $( $var:ident : $t:tt ),* ) => {
        use std::io::{stdin, Read};
        let mut bytes = stdin().bytes();
        let mut next = move || -> String {
            bytes
                .by_ref()
                .map(|r| r.unwrap() as char)
                .skip_while(|c| c.is_whitespace())
                .take_while(|c| !c.is_whitespace())
                .collect()
        };
        $(let $var = read_value!(next, $t);)*
    };

    ( $( $var:ident : $t:tt ),+ ,) => {
        input!{ $($var : $t),* }
    };
}

macro_rules! read_value {
    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        n: u32,
        a: [u32; n]
    };

    let mut a = a.iter().enumerate().map(|(i, x)| (x, i + 1)).collect::<Vec<_>>();
    a.sort();
    a.iter().map(|&(&_, i)| {
        println!("{}", i);
    }).collect::<Vec<_>>();
}
//  [swift]
readLine()
var a=[Int:Int]()
readLine()!.characters.split(" ").enumerate().map{a[$0.0]=Int(String($0.1))!}
a.sort{$0.1<$1.1}.map{print($0.0+1)}
//  [swift]
let n=Int(readLine()!)!

let a=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

var sa 	= Array(count: n, repeatedValue: 0 )

var i = 0
for i in 0..<n {
	sa[a[i]-1] = i+1
}

for i in 0..<n {
	print( sa[i], terminator: " " )
}
//  [swift]
readLine()
var a=[(Int,Int)]()
readLine()!.characters.split(" ").enumerate().map{a+=[($0.0,Int(String($0.1))!)]}
a.sort{$0.1<$1.1}.map{print($0.0+1)}
//  [typescript]
export class Main {
  static main(input: string): string {
    const tmp: string[] = input.split("\n");
    const [n]: number[] = tmp.shift().split(" ").map(int => parseInt(int));
    const a: number[] = tmp.shift().split(" ").map(int => parseInt(int));
    return `${a.map((i, index) => [i, index]).sort(([i1, _1], [i2, _2]) => i1 - i2).map(([_, i]) => i + 1).join(" ")}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [python]
import numpy as np
n = int(input())
data = np.array(list(map(int, input().split())))
count = 0
while np.sum(data % 2 != 0) == 0:
    data = data / 2
    count += 1
print (count)
//  [python]
import numpy as np

N = int(input())
num_list = np.array(list(map(int, input().split())))
count = 0
    
while(True):
    if any(num_list % 2 == 1):
            print(count)
            break
    else:
        num_list= num_list / 2
        count += 1
//  [python]
N = int(input())
A = list(map(int,input().split()))

import numpy as np
A = np.array(A)

ans = 0
while 1:
    if(sum(A%2) == 0):
        ans += 1
        A = A/2
    elif(sum(A%2) != 0):
        break;
print(ans)
//  [java]
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> list = new ArrayList<>(n);
		for(int i = 0; i < n; i++) list.add(sc.nextInt());
		int count =0;
		while(list.stream().allMatch(i -> i %2 == 0)){
			list = list.stream().map(i -> i /2).collect(Collectors.toList());
			count++;
		}
		System.out.println(count);
	}
}
//  [java]
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int size = sc.nextInt();
        List<Integer> xs = new ArrayList<>(size);
        for (int i = 0; i < size; i++) {
            xs.add(sc.nextInt());
        }

        int n = 0;
        while (true) {
            if (xs.stream().allMatch((x) -> x % 2 == 0)) {
                xs = xs.stream().map((x) -> x / 2).collect(Collectors.toList());
                n++;
            }
            else {
                break;
            }
        }

        System.out.println(n);
    }
}
//  [java]
import java.util.*;
import java.util.stream.*;

public class Main {

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {

            int N = sc.nextInt();
            long[] A = new long[N];
            for (int i = 0; i < N; i++) {
                A[i] = sc.nextLong();
            }

            int min = Arrays.stream(A).mapToInt(a -> {
                int ret = 0;
                for (int i = 1; i < 50; i++) {
                    if (((a >> i) << i) != a) {
                        ret = i - 1;
                        break;
                    }
                }
                return ret;
            }).min().getAsInt();

            System.out.println(min);

        }
    }

}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  int t=1000000000;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int m;
    int p=0;//割った回数
    int q=m;
    cin >> m;//入力した数
    for (int j=0; j<m; j++){
      if (q%2==1)
        break;
      else{
        q/=2;
        p++;
      }
    }
    if(t>p)
      t=p;
    else
      continue;
  }
  cout << t << endl;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;

int main(){
    int n;  cin>>n;
    long minA=1000000001;
    long a[n];
    for(int i=0;i<n;i++){
        cin>>a[i];
        if(a[i]<minA)minA=a[i];
    }

    int ans=0;

    for(int i=minA;i>0;i--){
        bool flag=false;
        for(int j=0;j<n;j++){
            if(a[j]%i==0 && a[j]%2==0){
                flag=true;
            }else {
                flag=false;
                break;
            }
        }

        if(flag==true){
            while(i>1){
                ans++;
                i/=2;
            }
            break;
        }
    }

    cout<<ans<<endl;



    return 0;
}
//  [c]
#include <stdio.h>

int main(void) {
	int n,a[200],i,j,c=0,max=0;
	scanf("%d",&n);
	for(i=0;i<n;i++) {
		scanf("%d",&a[i]);
		if(a[i]>max){max=a[i];}
	}
	for(i=0;i<max/2;i++){
		for(j=0;j<n;j++) {
			if(a[j]%2==0){a[j]=a[j]/2;}
			else{break;}
			if(j==n-1){c++;}
		}
	}		
	printf("%d\n",c);
	return 0;
}
//  [c]
#include <stdio.h>
int min(int a,int b){
    if(a > b){
        return b;
    }else return a;
}

int main(void){
    int N, i, min_count=100000;
    scanf("%d",&N);
    int a[N];
    
    for(i=0; i<N; i++)
    {
        scanf("%d",&a[i]);  
    }
    
    for(i=0; i<N; i++){
        int count=0;
        while(a[i] % 2 == 0){
            a[i] = a[i] / 2;
            count++;
        }
    
    min_count = min(count, min_count);
    
    }    

    printf("%d\n", min_count);   
    
    return 0;
}
//  [c]
#include <stdio.h>

int main(void){
    int n,count = 0,check = 0;
    scanf("%d",&n);
    int import[n];
    for (int i = 0; i < n; ++i) {
        scanf("%d",&import[i]);
    }

    do {
        check = 0;
        for (int i = 0; i < n; ++i) {
            if (import[i]%2 == 0){
                import[i] = import[i]/2;
                check++;
            }
            else{
                break;
            }
        }
        count++;
    }while (check == n);

    printf("%d",count - 1);
    return 0;
}
//  [javascript]

function Main(input) {
  var N = parseInt(input[0], 10);
  var list = input.slice(1).map(a => parseInt(a, 10));

  var result = 0;

  for (var i = 0; i < list.length; i++) {
    var kurikaesi = 0;
    while (list[i] % 2 === 0) {
      // 偶数なら２で割る
      list[i] = list[i] / 2;
      kurikaesi++;
    }
    if (i === 0) {
      result = kurikaesi;
    } else if (result > kurikaesi) {
      result = kurikaesi;
    }
  }

  console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));
//  [javascript]
function main(input) {
    var nums = input.split('\n')[1].split(' ');

    var count = 0;
    while(nums.every((n) => (n % 2) === 0)) {
        count++;
        nums = nums.map((n) => n / 2);
    }
    
    console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input){
  var nums = input.split('\n')[1].split(' ').map((n) => parseInt(n,10));
  var count = 0;
  while(nums.every((n) => (n % 2) === 0)) {
        count++;
        nums = nums.map((n) => n / 2);
    }

  console.log(count);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import (
	"fmt"
)

func main() {
	var (
		n     int
		count int
	)

	fmt.Scan(&n)
	nums := make([]int, n)

	for i := 0; i < n; i++ {
		fmt.Scan(&nums[i])
	}

	flag := true
	for flag {
		for i := 0; i < n; i++ {
			if nums[i]%2 == 0 {
				nums[i] /= 2
			} else {
				flag = false
			}
		}
		if flag {
			count++
		}
	}
	fmt.Println(count)
}
//  [go]
package main

import "fmt"

func main() {
	var n int
	fmt.Scanf("%d\n", &n)
	slice := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scanf("%d", &slice[i])
	}

	num := slice[0]
	min := 2
	cnt := 0

	for (num % min) == 0 {
		min *= 2
		cnt++
	}

	min /= 2

	for _, num := range slice[1:] {
		for (num % min) != 0 {
			min /= 2
			cnt--
		}
	}
	fmt.Println(cnt)
}
//  [go]
package main

import "fmt"

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

	ans := 0
	for {
		ok := true
		for i := 0; i < n; i++ {
			if as[i]%2 == 1 {
				ok = false
				break
			}
			as[i] /= 2
		}
		if !ok {
			break
		}
		ans++
	}
	fmt.Println(ans)
}
//  [ruby]
require "prime"
n = gets.chomp.to_i
a = gets.chomp.split(" ").map(&:to_i)
ans = Float::INFINITY
a.each do |i|
    if i.prime_division.sort[0][0] == 2
        ni = i.prime_division.sort[0][1]
    else
        ni = 0
    end
    ans = [ans,ni].min
end
puts ans
//  [ruby]
require 'prime'
n=gets.to_i
a=gets.split.map(&:to_i)
min=Float::INFINITY
a.each do |i|
  min=0 if i%2==1
  i.prime_division.each do |m,n|
    min=[min,n].min if m==2
  end
end
p min
//  [ruby]
require 'prime';gets;p gets.split.map{|n|m=n.to_i.prime_division[0];m[0]==2?m[1]:0}.min
//  [rust]
#![allow(unused_imports)]

use text_io::*;
use proconio::*;
use std::collections::*;
use std::process::exit;
use std::cmp::*;
use itertools::Itertools;


fn main() {
    input! {
    mut a:usize,
    mut b:[usize;a],
    }
    for i in 0..a {
        b[0]|=b[i]
    }
    a=0;
    while b[0]%2==0 {
        a+=1;
        b[0]/=2
    }
    println!("{}",a)
}
//  [rust]
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::{Bytes, Chars};
#[allow(unused_imports)]
use std::cmp::{min, max};

fn main() {
	input! {
		n: usize,
		mut a: [usize; n],
	}

	let mut ans = 0;
	loop {
		for i in 0..n {
			if a[i] % 2 == 1 {
				println!("{}", ans);
				return;
			}
			a[i] /= 2;
		}
		ans += 1;
	}
}
//  [swift]
//
//  main.swift
//  AtCoder
//
//  Created by nakailand on 2020/08/19.
//  Copyright © 2020 nakailand. All rights reserved.
//

import Foundation

func readInt() -> Int {
    return Int(readLine()!)!
}

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readTwoInts() -> (a: Int, b: Int) {
    let ints = readLine()!.split(separator: " ").map { Int($0)! }
    return (a: ints[0], b: ints[1])
}

func prime_factor(n: Int) -> [Int] {
    var ret: [Int] = []
    var k = n
    for i in 2..<Int(sqrt(Double(n)))+1 {
        while k % i == 0 {
            ret.append(i)
            k = Int(floor(Double(k / i)))
        }
    }
    
    if k != 1 {
        ret.append(k)
    }
    
    return ret
}

let N = readInt()
var A = readInts()
var ans = 1000000007
for a in A {
    ans = min(prime_factor(n: a).filter { $0 == 2 }.count, ans)
}

print(ans)
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func isAllEven(_ ints: [Int]) -> Bool {
    let existsOdd = ints.contains { (i) -> Bool in
        i % 2 == 1
    }
    return !existsOdd
}

func modAll(_ ints: [Int]) -> [Int] {
    let result = ints.map { (i) -> Int in
        i / 2
    }
    return result
}

func main() {
    let _ = Int(readLine()!)!
    var tmpInts = readInts()
    var count = 0
    var canContinue = isAllEven(tmpInts)
    while canContinue {
        count += 1
        tmpInts = modAll(tmpInts)
        canContinue = isAllEven(tmpInts)
    }
    
    print("\(count)")
}

main()
//  [swift]
let n=Int(readLine()!)!
var arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}
var r=1<<30
for i in 0..<n {
	var r0=0
	while (arr[i]%2)<1 {
		arr[i]/=2
		r0+=1
	}
	if r>r0 {r=r0}
}
print(r)
//  [typescript]
// general helpers
const debug = (message?: any, ...optionalParams: any[]) => {
  if (process.env.LOCAL_DEBUG === '1') console.log(message, ...optionalParams)
}

// helpers
const parseLines = (
  lines: string[]
): any => {
  const N = +lines[0]
  const A = lines[1].split(' ').map(s => +s)
  const obj = { N, A }
  debug(obj)
  return obj
}

// solver
export const solve = (lines: string[]): string => {
  const { A } = parseLines(lines)
  let isOdd = false
  let count = 0
  while (!isOdd) {
    isOdd = A.some((a: number) => a % 2 !== 0)
    if (isOdd) {
      break
    }
    for(let i = 0; i < A.length; i++) {
      A[i] /= 2
    }
    count++
  }
  return `${count}`
}

// main
const main = (lines: string[]) => {
  console.log(solve(lines))
}

// exec main function for submit
if (process.env.LOCAL_DEBUG !== '1') {
  const { stdin: input, stdout: output } = process
  input.resume()
  input.setEncoding('utf8')
  const lines: string[] = []
  require('readline')
    .createInterface({ input, output })
    .on('line', (line: string) => lines.push(line))
    .on('close', () => main(lines))
}
//  [typescript]
const lines = [];
const reader = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout,
});

reader.on("line", function (line) {
  lines.push(line);
});
reader.on("close", function () {
  const input = lines[0] as string;
  const numbers = (lines[1] as string).split(" ");

  console.log(countDivide(numbers, Number(input[0]), 0));
});

function countDivide(numbers: string[], inputNum: number, count: number) {
  let nextNumbers: string[] = [];
  let nextFlag = true;

  numbers.forEach((number) => {
    if (Number(number) % 2 !== 0) {
      nextFlag = false;
    }

    let halfNumber = Number(number) / 2;
    nextNumbers.push(String(halfNumber));
  });

  if (nextFlag) {
    count++;
    return countDivide(nextNumbers, inputNum, count);
  } else {
    return count;
  }
}
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  let blackboard = input[1].map(Number);

  let answer = 0;

  while (true) {
    if (blackboard.some((A) => A % 2 !== 0)) {
      break;
    }

    blackboard = blackboard.map((A) => A / 2);

    answer += 1;
  }

  return answer;
};

console.log(main(read()));
//  [python]
N=int(input())
c=[]
d=[]
for i in range(1,10**8):
  if (N%i)==0 and (int(N/i)-i)>=0:
    c.append(int(N/i)-i)
    d.append(int(N/i))

for l in range(0,len(c)):
  if min(c)==c[l] and len(c)>1:
    m=N/d[l]
    print(int((m-1)+(d[l]-1)))
  elif len(c)==1:
    print(N-1)
//  [python]
N=int(input())
l=[]
for i in range(2,int(N**0.5)+1):
    if N % (i) == 0:
       l.append(i)
if len(l) == 0:
    print(N-1)
elif len(l) == 1:
    print(int(N / l[0]) + l[0] -2)
elif len(l) == 2 and N == l[0] * l[1]:
    print(l[0] + l[1] -2)
else:
    distance = 10**12 - 2
    tmp = 0
    for i in range(len(l)):
        for j in range(i, len(l)):
            if N % (l[i] * l [j]) == 0 and distance > (N / (l[i] * l [j])) + (l[i] * l [j]) -2:
              distance = int(N / (l[i] * l [j])) + (l[i] * l [j]) -2
    print(distance)
//  [python]
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.readline().rstrip())

    ret = float('inf')
    for i in range(1, 10000000):
        q, mod = divmod(N, i)
        if mod == 0:
            j = N // i
            ret = min(ret, ((j-1)+(i-1)))

    print(ret)


if __name__ == '__main__':
    main()
//  [java]
import java.math.BigInteger;
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigInteger N = new BigInteger(sc.next());
        sc.close();

        for (int i=(int)Math.sqrt(N.doubleValue()); i>0; i--) {
            BigInteger d[] = N.divideAndRemainder(new BigInteger(Integer.toString(i)));
            if (d[1].compareTo(BigInteger.ZERO)==0) {
                System.out.println(d[0].add(N.divide(d[0])).subtract(new BigInteger("2")));
                break;
            }
        }
    }
}
//  [java]
import java.math.BigInteger;
import java.util.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    BigInteger n = new BigInteger(sc.next());
    BigInteger sqrt = BigInteger.ONE;
    for (BigInteger i = BigInteger.ONE; i.compareTo(n) <= 0; i = i.add(BigInteger.ONE)) {
      if (i.multiply(i).compareTo(n) > 0) {
        sqrt = i.subtract(BigInteger.ONE);
        break;
      }
    }
    for (BigInteger i = sqrt; i.compareTo(BigInteger.ZERO) > 0; i = i.subtract(BigInteger.ONE)) {
      if (n.remainder(i).compareTo(BigInteger.ZERO) == 0) {
        System.out.println(i.subtract(BigInteger.ONE).add(n.divide(i).subtract(BigInteger.ONE)));
        break;
      }
    }
  }
}
//  [java]
import java.math.BigInteger;
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigInteger N = new BigInteger(sc.next());
        sc.close();

        for (int i=new Double(Math.sqrt(N.doubleValue())).intValue(); i>0; i--) {
            if (N.mod(new BigInteger(Integer.toString(i))).compareTo(BigInteger.ZERO)==0) {
                System.out.println(N.divide(new BigInteger(Integer.toString(i))).add(new BigInteger(Integer.toString(i-2))));
                break;
            }
        }
    }
}
//  [cpp]
#include <iostream>
#define ll long long int
using namespace std;

int main(){

    ll N,a,b,ret,_ret;
    cin >> N;

    a = N;
    b = 1;
    ret = a + 1 - 2;

    for (int i=1; i<=100000000; i ++){
        if(a%i == 0){
            _ret = (a/i) + (b*i) - 2;
            if(ret > _ret){
                ret = _ret;
            }
        }
    }

    cout << ret<< endl;


    return 0; 
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

int main() {
  long int i, j, N, min, flag;
  flag = 0;
  cin >> N;
  if(N >1000000){
    for(i = 1; i <= N/10000; i++){
    if(0 == N % i){
      j = N / i;
        //初回
        if(flag == 0){
           min = (j + i) - 2;
          flag = flag + 1;
        }
        //２回目以降
        if(min > (j + i) - 2){
          min = (j + i) - 2;
        }
     }
    }
  }else{
  for(i = 1; i <= N; i++){
    if(0 == N % i){
      j = N / i;
        //初回
        if(flag == 0){
           min = (j + i) - 2;
          flag = flag + 1;
        }
        //２回目以降
        if(min > (j + i) - 2){
          min = (j + i) - 2;
        }
     }
  }
  }
   cout << min << endl;
}
//  [cpp]
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 1; i <= (n); i++)

int main()
{
	long long N;
	cin >> N;

	long long min = 1000000000000;
	int flag = 0;

	for (long long i = 1; i <= 100000000; i++)
	{
		if (N % i == 0)
		{
			if (N / i + i - 2 < min)
			{
				min = N / i + i - 2;
				flag = 1;
			}
		}
	}
	if(flag == 1){
		cout << min << endl;
	}else{
		cout << N-1 << endl;
	}
	return 0;
}
//  [c]
#include <stdio.h>
#include <math.h>
long long int min(long long int a, long long int b)
{
    if (a > b) return b;
    else return a;
}

int main(void)
{
    long long int a, b, dist, f = 0;
    scanf("%ld", &a);
    dist=a-1;
    for (long long int i=2; i<sqrt(a)*10; i++){
        if (a % i == 0){
          b = a/i;
          dist = min(dist, i+b-2);
        }
    }
    printf("%ld", dist);
    return 0;
}
//  [c]
#include<stdio.h>
#include <stdlib.h>



int main() {
	long long int n,d;
	long long int hantei;
	long long int i, j;
	scanf("%llu", &n);
	hantei = n - 1;
	for (i = 1; i < 10000000; i++) {
		if (n%i == 0) {
			d = n / i;
			if (hantei > (i - 1) + (d - 1)) {
				hantei = (i - 1) + (d - 1);
			}
		}
	}

	
	printf("%llu\n",hantei);

	return 0;
}
//  [c]
#include <stdio.h>
#include <math.h>
int main()
{
    double n,i,min,q;
    scanf("%lf",&n);
    min=n+1;
    q=sqrt(n);
    for(i=1;i<=q;i++)
    {
        if(fmod(n,i)==0)
        {
            if(min>i+n/i)
                min=i+n/i;
        }
    }
    printf("%1.0f\n",min-2);

}
//  [javascript]
"use strict";
var GET=(function(){function f(s){return new g(s);}function g(s){this._s=s.trim().split("\n");this._y=0;}g.prototype.a=function(f){var s=this._s, y=this._y, r;if(typeof s[y]==="string")s[y]=s[y].split(" ").reverse();r=s[y].pop();if(!s[y].length)this._y++;return f?r:+r;};g.prototype.l=function(f){var s=this._s[this._y++].split(" ");return f?s:s.map(a=>+a);};g.prototype.m=function(n,f){var r=this._s.slice(this._y,this._y+=n).map(a=>a.split(" "));return f?r:r.map(a=>a.map(a=>+a));};g.prototype.r=function(n,f){var r=this._s.slice(this._y,this._y+=n);return f?r:r.map(a=>+a);};return f;})();
var o=GET(require("fs").readFileSync("/dev/stdin","utf8"));
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill(0).map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill(0).map(x=>"+r+")";return eval(r);}

console.log(main());
function main(){
  var n = o.a();
  var ans = n-1;
  for(var i = 2; i*i <= n; i++){
    if(n%i === 0)ans = i+n/i-2;
  }
  return ans;
}
//  [javascript]
"use strict";
const main = arg => {
  let num1, num2;
  let ans = 0;
  let info = arg * 1;
  for(let i = 1; i <= Math.sqrt(info); i++){
    if(info % i == 0){
      ans = i + (info / i) - 2;
    }
  }
  if(ans == 0){
  	ans = info - 1;
  }
  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";var n=r(1);r(2)(n.readFileSync("/dev/stdin","utf8"))},function(t,e){t.exports=require("fs")},function(t,e,r){"use strict";var n=r(3),i=r(5);t.exports=function(t){var e=new n(t);i(e)}},function(t,e,r){"use strict";var n=r(4);t.exports=class{constructor(t){var e=t.trim().split(/\s+/g);this.inp=new n(e)}inr(){return this.inp.deq()}in(){return parseInt(this.inp.deq(),10)}fin(){this.inp.clear()}}},function(t,e,r){"use strict";t.exports=class{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.size=t.length,this.items=t,this.ind=0}enq(t){this.size+=1,this.items.push(t)}deq(){var t=this.items[this.ind];return this.size-=1,this.ind+=1,t}clear(){this.items=[],this.size=0,this.ind=0}}},function(t,e,r){"use strict";var n=r(6);t.exports=function(t){var e=t.in(),r=n(e),i=e,s=1,o=e;for(var u in r){if(u>r[u])break;i>r[u]-u&&(s=u,o=r[u],i=r[u]-u)}console.log(s-1+o-1)}},function(t,e,r){"use strict";t.exports=function(t){for(var e={},r=Math.ceil(Math.sqrt(t)),n=1;n<r+1;n++)t%n==0&&(e[n]=t/n,e[t/n]=n);return e}}]);
//  [go]
package main

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

var (
	N int
)

func readVariables() {
	N = nextInt()
}

func main() {
	readVariables()
	upperbound := 10000000
	answer := 1234567890123456
	for i := 1; i < upperbound; i++ {
		if N%i == 0 {
			answer = MinInt(i-1+(N/i)-1, answer)
		}
	}
	fmt.Println(answer)
}

/* 以下、テンプレート*/

var scanner *bufio.Scanner

func init() {
	scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
}

//nextInt converts next token from stdin and returns integer value.
//nextInt panics when conversion into an integer fails.
func nextInt() int {
	if !scanner.Scan() {
		panic("No more token.")
	}
	num, err := strconv.Atoi(scanner.Text())
	if err != nil {
		panic("nextInt(): cannot convert to int: " + scanner.Text())
	}
	return num
}

func nextStr() string {
	if !scanner.Scan() {
		panic("No more token.")
	}
	return scanner.Text()
}

func MinInt(x, y int) int {
	if x < y {
		return x
	} else {
		return y
	}
}

//MaxInt は、2つの整数を受け取り、最大値を返します。
func MaxInt(x, y int) int {
	if x < y {
		return y
	} else {
		return x
	}
}

//AbsInt は、整数の絶対値を返します。
func AbsInt(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

//ModPow は整数の累乗関数で、剰余もサポートします。
//base^exponentの値をmoduleで割った余りを返します。
//moduloが1以下の場合には、剰余演算をしません。
//baseが負の値である場合には、返す値が負になることがあります。
func ModPow(base, exponent, modulo int) (result int) {
	result = 1
	for exponent > 0 {
		if exponent%2 == 1 {
			result *= base
			if modulo > 1 {
				result %= modulo
			}
		}
		base *= base
		if modulo > 1 {
			base %= modulo
		}
		exponent /= 2
	}
	return
}

//Gcd は、引数の整数全ての最大公約数を返します。
func Gcd(vals ...int) (result int) {
	if len(vals) == 0 {
		return
	}
	result = vals[0]
	for i := 1; i < len(vals); i++ {
		result = gcd(result, vals[i])
	}
	return
}

func gcd(x, y int) int {
	x, y = AbsInt(x), AbsInt(y)
	for y > 0 {
		x, y = y, x%y
	}
	return x
}

//Lcm は、与えられた整数の最小公倍数を返します。
func Lcm(vals ...int) (result int) {
	if len(vals) == 0 {
		return
	}
	result = vals[0]
	for i := 1; i < len(vals); i++ {
		result = lcm(result, vals[i])
	}
	return
}

func lcm(x, y int) int {
	return x * y / gcd(x, y)
}
//  [go]
package main

import (
	"fmt"
	"math"
	"sort"
)

func main() {
	var n, r int
	fmt.Scan(&n)
	var a []int
	for i := 1; i*i <= n; i++ {
		if n%i == 0 {
			a = append(a, i)
			if i != n/i {
				a = append(a, n/i)
			}
		}
	}
	sort.Sort(sort.IntSlice(a))

	min := math.MaxInt64
	for i := 0; i < len(a); i++ {
		for j := i; j < len(a); j++ {
			if a[i]*a[j] == n {
				if min > a[j]+a[i] {
					r = (a[i] - 1) + (a[j] - 1)
					min = a[j] + a[i]
				}
			}
		}
	}
	fmt.Println(r)
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	scanInit()

	n := nextInt64()
	if isPrime(n) == true {
		fmt.Println(n - 1)
		return
	}
	_, divlist := getDivlistSlow(n)
	//fmt.Println(divcnt, divlist)

	var minwalk int64 = n
	for _, v := range divlist {
		nowwalk := (v - 1) + (n/v - 1)
		minwalk = min(minwalk, nowwalk)
	}
	fmt.Println(minwalk)
}
func min(a, b int64) int64 {
	if a > b {
		return b
	}
	return a
}

// 約数列挙リストを作成(愚直)
func getDivlistSlow(a int64) (cnt int64, divlist []int64) {
	for i := int64(1); i*i <= a; i++ {
		if a%i == 0 {
			cnt++
			divlist = append(divlist, i)
			if i*i != a { // 6*6=36 などを重複カウントしない
				cnt++
				divlist = append(divlist, a/i)
			}
		}
	}
	return cnt, divlist
}

// 素数判定
func isPrime(a int64) bool {
	for i := int64(2); i*i <= a; i++ {
		if a%i == 0 {
			return false
		}
	}
	return true
}

// ---- readfunc
func scanInit() {
	const cap = 200 * 1024 // Default=64
	var buf = make([]byte, cap)
	sc.Buffer(buf, cap)
	sc.Split(bufio.ScanWords)
	return
}
func nextInt64() int64 {
	sc.Scan()
	i, e := strconv.ParseInt(sc.Text(), 10, 64)
	if e != nil {
		panic(e)
	}
	return i
}
func nextStr() string {
	sc.Scan()
	return sc.Text()
}
//  [ruby]
n = gets.chomp.to_i

root = Math.sqrt(n)
temp = 0
(1..root).to_a.each do |v|
  a, b = n.divmod(v)
  next if not b.zero?
  temp = a + v -2 if temp.zero?
  temp = temp > a + v -2 ? a + v -2 : temp
end

p temp
//  [ruby]
n = gets.chomp
n = n.to_i

pre = ans = -1
(1..Math.sqrt(n)).reverse_each do |i|
    if n / i == n * 1.0 / i
        ans = i + n / i
        break
    end
end

# start at (1, 1)
ans -= 2

puts ans
//  [ruby]
N = gets.to_i

sn = Math.sqrt(N)
ans = Float::INFINITY

1.upto(sn) do |a|
  d, m = N.divmod(a)
  next if m != 0

  ans = d + a if ans > d + a
end

puts ans - 2
//  [rust]
fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();

    let n: i64 = s.trim().parse().unwrap();
    let mut kouho: Vec<i64> = Vec::new();

    for i in 1..10_000_000 {
        if n%i==0 {
            if n==i {
                kouho.push(n/i+i-1);
            } else {
                kouho.push(n/i+i-2);
            }
        }
    }

    if kouho.is_empty() {
        println!("{}", n-1);
        return;
    }

    kouho.sort();
    println!("{}", kouho[0]);
}