Consider some square matrix A with side n consisting of zeros and ones. There are n rows numbered from 1 to n from top to bottom and n columns numbered from 1 to n from left to right in this matrix. We'll denote the element of the matrix which is located at the intersection of the i-row and the j-th column as Ai, j.Let's call matrix A clear if no two cells containing ones have a common side.Let's call matrix A symmetrical if it matches the matrices formed from it by a horizontal and/or a vertical reflection. Formally, for each pair (i, j) (1 ≤ i, j ≤ n) both of the following conditions must be met: Ai, j = An - i + 1, j and Ai, j = Ai, n - j + 1.Let's define the sharpness of matrix A as the number of ones in it.Given integer x, your task is to find the smallest positive integer n such that there exists a clear symmetrical matrix A with side n and sharpness x.

The only line contains a single integer x (1 ≤ x ≤ 100) — the required sharpness of the matrix.

Print a single number — the sought value of n.

NoteThe figure below shows the matrices that correspond to the samples:

import java.util.*;
import java.io.*;

public class Solution {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int x = in.nextInt();

        if (x == 3) {
            System.out.println(5);
            return;
        }

        int i;
        for (i = 1; x > 1 + (4 * (i - 1)) * i / 2; i++) {
        }
        int n = i * 2 - 1;

        out.println(n);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg) {
        new Solution().run();
    }
}

import java.util.*;
import java.io.*;
public class a {
    static long mod = 1000000007;
    public static void main(String[] args) throws IOException {
        // Scanner input = new Scanner(new File("input.txt"));
        // PrintWriter out = new PrintWriter(new File("output.txt"));
        input.init(System.in);
        PrintWriter out = new PrintWriter((System.out));

        int n = input.nextInt(),res = 0;
        if(n==1) res = 1;
        else if(n<=5 && n != 3) res = 3;
        else if(n<=13) res = 5;
        else if(n<=25) res = 7;
        else if(n<=41) res = 9;
        else if(n<=61) res = 11;
        else if(n<=85) res = 13;
        else res = 15;
        out.println(res);

        out.close();
    }
    static long pow(long x, long p) {
        if (p == 0)
            return 1;
        if ((p & 1) > 0) {
            return (x * pow(x, p - 1)) % mod;
        }
        long sqrt = pow(x, p / 2);
        return (sqrt * sqrt) % mod;
    }

    static class input {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

        /** call this method to initialize reader for InputStream */
        static void init(InputStream input) {
            reader = new BufferedReader(new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }

        /** get next word */
        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                // TODO add check for eof if necessary
                tokenizer = new StringTokenizer(reader.readLine());
            }
            return tokenizer.nextToken();
        }

        static int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        static long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        static String nextLine() throws IOException {
            return reader.readLine();
        }
    }
    public static boolean[] sieve(int n)
    {
        boolean[] res = new boolean[n+1];
        for(int i = 2; i<=n; i++) res[i] = true;
        for(int i = 2; i <= Math.sqrt(n); i++)
            if(res[i])
                for(long j = (long)i*i; j<=n; j+=i)
                    res[(int) j] = false;
        return res;
    }
    //GCD - O(log(max(p, q)))
    //res[0] is gcd of p and q
    //res[1] and res[2] are values used in extended Euclidean algorithm for inverse mod
    public static long[] gcd(long p, long q)
    {
        if(q==0)
            return new long[] {p, 1, 0};
        long[] vals = gcd(q, p%q);
        return new long[] {vals[0], vals[2], vals[1] - (p/q)*vals[2]};
    }
    //Inverse Mod - O(log(mod))
    //Returns A s.t. x*A = 1(MOD mod)
    public static long invmod(long x)
    {
        long[] vals = gcd(x, mod);
        if(vals[0]>1)
            return -1;
        if(vals[1]>0)
            return vals[1];
        return mod + vals[1];
    }
}

import java.io.*;
import java.util.*;

public class C {
	static Scanner scan = new Scanner (System.in);
	static PrintStream out = System.out;

	public static void main (String[] args) {
		int x = scan.nextInt();
		int n = 1;
		if (x == 3) {
			out.println (5); return;
		}

		while ((n*n)/2 + 1 < x)
			n += 2;
		out.println (n);
		return;
	}
}

import java.util.Scanner;

public class Matrix {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int lowermax=1;
        int uppermax=1;
        int side=-1;
       do {
           side+=2;
            lowermax= uppermax;
            uppermax= (((side/2)+1)*((side/2)+1)) + ((side/2)*(side/2));

        } while ( num > uppermax );
        if  (num!=3)
 {System.out.println(side);}
        else
            System.out.println(5);
    }

}

import java.util.Scanner;

public class Main
{
    public static void main( String[] args )
    {
        Scanner in = new Scanner( System.in );
        int x = in.nextInt();
        if ( x == 3 ) System.out.println( 5 );
        else
        {
            int current_max_of_1 = 1;
            int optimal_length = 1;
            for ( int i = 1; current_max_of_1 < x ; i += 2 )
            {
                current_max_of_1 = ( i / 2 + 1 ) * ( i / 2 + 1 ) + ( i / 2 ) * ( i / 2 );
                optimal_length = i;
            }
            System.out.println( optimal_length );
        }
    }
}

import java.util.*;
import java.io.*;

public class Solution {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int x = in.nextInt();

        if (x == 3) {
            System.out.println(5);
            return;
        }

        int capacity = 1;
        int n = 1;
        while (x > capacity) {
            capacity += 4 * ((n + 1) / 2);
            n += 2;
        }

        System.out.println(n);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg) {
        new Solution().run();
    }
}

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map.Entry;
import java.util.Scanner;

public class Main {

    public void dfs(){
    }

    public void solve() {
        Scanner sc=new Scanner(System.in);

        int n=sc.nextInt();

        if(n==1){
            ln(1);
            return;
        }
        if(n==3){
            ln(5);
            return;
        }

        if(1<=n && n<=5){
            ln(3);
            return;
        }
        if(5<n && n<=13){
            ln(5);
            return;
        }
        if(13<n && n<=25){
            ln(7);
            return;
        }
        if(25<n && n<=41){
            ln(9);
            return;
        }
        if(41<n && n<=61){
            ln(11);
            return;
        }
        if(61<n && n<=85){
            ln(13);
            return;
        }
        if(85<n && n<=100){
            ln(15);
            return;
        }
    }

    public void run() {
        solve();
    }

    public static void main(String[] _) {
        new Main().run();
    }

    public static void ln() {
        System.out.println();
    }
    public static void ln(Object o) {
        System.out.println(o);
    }

    public static void pr(Object o) {
        System.out.print(o);
    }

}

// practice with kaiboy
import java.io.*;
import java.util.*;

public class CF202C extends PrintWriter {
	CF202C() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		CF202C o = new CF202C(); o.main(); o.flush();
	}

	void main() {
		int x = sc.nextInt();
		int n;
		if (x == 1)
			n = 1;
		else if (x == 2)
			n = 3;
		else if (x == 3)
			n = 5;
		else {
			n = (int) Math.sqrt(x * 2 - 1);
			if (n * n < x * 2 - 1)
				n++;
			if (n % 2 == 0)
				n++;
		}
		println(n);
	}
}

import java.util.*;
import java.io.*;
import java.math.*;
public class cf
{
    static int n;
    static long arr[];
    static int counter;
    public static void main(String[] args)throws IOException
    {
        PrintWriter out= new PrintWriter(System.out);
        Scanner sc=new Scanner(System.in);
        n=sc.nextInt();
        if(n==1)
        System.out.println(1);
        else if(n==2)
        System.out.println(3);
        else if(n==3)
        System.out.println(5);
        else
        {
            for(int i = 1 ;;i+=2)
            {
                if((i*i+1)/2>=n)
                {
                    System.out.println(i);
                    System.exit(0);
                }
            }
        }
    }
}

//package codeforces;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.Closeable;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.StringTokenizer;

public class A implements Closeable {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    A() throws IOException {
//        reader = new BufferedReader(new FileReader("input.txt"));
//        writer = new PrintWriter(new FileWriter("output.txt"));
    }

    StringTokenizer stringTokenizer;

    String next() throws IOException {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            stringTokenizer = new StringTokenizer(reader.readLine());
        }
        return stringTokenizer.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    private int MOD = 1000 * 1000 * 1000 + 7;

    int sum(int a, int b) {
        a += b;
        return a >= MOD ? a - MOD : a;
    }

    int product(int a, int b) {
        return (int) (1l * a * b % MOD);
    }

    int pow(int x, int k) {
        int result = 1;
        while (k > 0) {
            if (k % 2 == 1) {
                result = product(result, x);
            }
            x = product(x, x);
            k /= 2;
        }
        return result;
    }

    int inv(int x) {
        return pow(x, MOD - 2);
    }

    void solve() throws IOException {
        int x = nextInt();
        int n = 1;
        if(x == 3) {
            n = 5;
        }
        while(n * n / 2 + 1 < x) {
            n += 2;
        }
        writer.println(n);
    }

    public static void main(String[] args) throws IOException {
        try (A a = new A()) {
            a.solve();
        }
    }

    @Override
    public void close() throws IOException {
        reader.close();
        writer.close();
    }
}

import static java.util.Arrays.*;
import static java.lang.Math.*;
import static java.math.BigInteger.*;
import java.util.*;
import java.math.*;
import java.io.*;

public class A implements Runnable
{
	String file = "input";

	boolean TEST = System.getProperty("ONLINE_JUDGE") == null;

	void solve() throws IOException
	{
		int x = nextInt();
		if(x == 2)
		{
			out.println(3);
			return;
		}
		for(int i = 1; ; i += 2)
			if(can(x, i))
			{
				out.println(i);
				return;
			}
	}

	boolean can(int x, int n)
	{
		int num = (n * n + 1) / 2;
		if(num < x) return false;
		if(num == x) return true;

		int[][] mat = new int[n + 2][n + 2];
		for(int i = 1; i <= n; i++)
			for(int j = 1; j <= n; j++)
			{
				boolean ok = true;
				for(int dx = -1; dx <= 1; dx++)
					for(int dy = -1; dy <= 1; dy++)
						if((dx == 0) ^ (dy == 0))
						{
							int tx = i + dx;
							int ty = j + dy;
							if(mat[tx][ty] != 1) continue;
							ok = false;
						}
				if(ok)
				{
					mat[i][j] = 1;
					mat[n - i + 1][j] = 1;
					mat[i][n - j + 1] = 1;
					mat[n - i + 1][n - j + 1] = 1;
				}
			}
		while(num - 4 >= x)
		{
			boolean next = false;
			outer: for(int i = 1; i <= n; i++)
				for(int j = 1; j <= n; j++)
					if(mat[i][j] == 1)
					{
						Set<Integer> set = new HashSet<Integer>();
						set.add(i * 1000 + j);
						set.add((n - i + 1) * 1000 + j);
						set.add(i * 1000 + (n - j + 1));
						set.add((n - i + 1) * 1000 + (n - j + 1));

						if(set.size() == 4)
						{
							mat[i][j] = 0;
							mat[n - i + 1][j] = 0;
							mat[i][n - j + 1] = 0;
							mat[n - i + 1][n - j + 1] = 0;
							next = true;
							break outer;
						}
					}
			if(!next) break;
			num -= 4;
		}
		while(num - 2 >= x)
		{
			boolean next = false;
			outer: for(int i = 1; i <= n; i++)
				for(int j = 1; j <= n; j++)
					if(mat[i][j] == 1)
					{
						Set<Integer> set = new HashSet<Integer>();
						set.add(i * 1000 + j);
						set.add((n - i + 1) * 1000 + j);
						set.add(i * 1000 + (n - j + 1));
						set.add((n - i + 1) * 1000 + (n - j + 1));

						if(set.size() == 2)
						{
							mat[i][j] = 0;
							mat[n - i + 1][j] = 0;
							mat[i][n - j + 1] = 0;
							mat[n - i + 1][n - j + 1] = 0;
							next = true;
							break outer;
						}
					}
			if(!next) break;
			num -= 2;
		}
		if(num - 1 >= x) num--;
		return num == x;
	}

	String next() throws IOException
	{
		while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(input.readLine());
		return st.nextToken();
	}

	int nextInt() throws IOException
	{
		return Integer.parseInt(next());
	}

	long nextLong() throws IOException
	{
		return Long.parseLong(next());
	}

	double nextDouble() throws IOException
	{
		return Double.parseDouble(next());
	}

	void print(Object... o)
	{
		System.out.println(deepToString(o));
	}

	void gcj(Object o)
	{
		String s = String.valueOf(o);
		out.println("Case #" + test + ": " + s);
		System.out.println("Case #" + test + ": " + s);
	}

	BufferedReader input;
	PrintWriter out;
	StringTokenizer st;
	int test;

	void init() throws IOException
	{
		if(TEST) input = new BufferedReader(new FileReader(file + ".in"));
		else input = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(new BufferedOutputStream(System.out));
	}

	public static void main(String[] args) throws IOException
	{
		new Thread(null, new A(), "", 1 << 20).start();
	}

	public void run()
	{
		try
		{
			init();
			if(TEST)
			{
				int runs = nextInt();
				for(int i = 0; i < runs; i++) solve();
			}
			else solve();
			out.close();
		}
		catch(Exception e)
		{
			e.printStackTrace();
			System.exit(1);
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br1 = new BufferedReader(
				new InputStreamReader(System.in));
		int sharpness = Integer.parseInt(br1.readLine());
		if (sharpness == 1) {
			System.out.println(1);
			return;
		} else if (sharpness == 2) {
			System.out.println(3);
			return;
		} else if (sharpness == 3) {
			System.out.println(5);
			return;
		} else if (sharpness == 4) {
			System.out.println(3);
			return;
		} else if (sharpness == 5) {
			System.out.println(3);
			return;
		} else {
			int max = 2 * sharpness - 1;
			int result = (int) Math.ceil(Math.sqrt(max));
			result = result%2==0? result+1:result;
			System.out.println(result);
		}

	}
}

    import java.util.*;
    import java.io.*;
    import java.math.*;

    public class C {
        public static Scanner scan = new Scanner(System.in);
        public static boolean bg = true;

        public static void main(String[] args) throws Exception {
            TreeMap<Integer,Integer> odd = new TreeMap();
            int cur = 1;
            for (int i=1;i<=100;i+=2){
                odd.put(cur, i);
                cur+=(i+1)*2;
            }

            TreeMap<Integer,Integer> even = new TreeMap();
            for (int i=2;i<=100;i+=2){
                int k1 = i/4;
                int add1 = k1*k1*4;

                int k2 = (i-1)/4;
                int add2 = k2*k2*4;
                even.put(add1+add2, i);
            }
            //if (bg) System.out.println(odd);
            //if (bg) System.out.println(even);
            int k1 = Integer.parseInt(scan.next());
            System.out.println(ans(k1));

        }
        public static int ans (int n1){
            if (n1==1) return 1;
            if (n1%4==0){
                int k1 = n1/4;
                for (int i=0;i<=1000;i++){
                    k1 -= i;
                    if (k1<=0) return i*2+1;
                }
            }
            else if (n1%4==1){

                return ans(n1-1);
            }
            else if (n1%4==2){
                return (ans(n1+2));
            }
            else if (n1%4==3){
                if (n1==3) return 5;
                else {
                    return (ans(n1+2));
                }
            }
            return -1;
        }
    }

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int x = in.nextInt();
            for (int i = 1; i <= 15; i += 2) {
                int curX = (i * i + 1) / 2;
                if (curX >= x) {
                    if (x == 3 && curX == 5) continue;
                    out.println(i);
                    return;
                }
            }
        }

    }

    static class InputReader {
        private StringTokenizer tokenizer;
        private BufferedReader reader;

        public InputReader(InputStream inputStream) {
            reader = new BufferedReader(new InputStreamReader(inputStream));
        }

        private void fillTokenizer() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }

        public String next() {
            fillTokenizer();
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.*;
import java.util.regex.*;
import java.text.*;
import java.math.*;
import java.awt.geom.*;

public class A {
	public static final boolean debug = false;
	void pln(Object o) {System.out.println(o.toString());}
	void pl(Object o) {System.out.print(o.toString());}

	public void solve() {
		Scanner sc = null;

		if (debug) {
			try {
				sc = new Scanner(new File("P1.in"));
			}
			catch (Exception e) {
				e.printStackTrace();
			}
		}
		else {
			sc = new Scanner(System.in);
		}

		int x = sc.nextInt();

		int n = Integer.MAX_VALUE;
		if (x % 4 == 0) {
			for (int k=1; k<=1000; k++) {
				if ((((k-1)*(k-1) + 1) / 2) * 4 >= x) {
					n = 2*k;
					break;
				}
			}
		}

		for (int k=0; k<=1000; k++) {
			if (x == 3 && k == 1) continue;
			int x1 = ((k*k + 1) / 2) * 4;
			int x2 = (k / 2) * 4;
			int x3 = 1;
			if (x1 + x2 + x3 >= x) {
				n = Math.min(n, 2*k + 1);
				break;
			}
		}

		System.out.println(n);
//		pw.close();
	}

	public static void main(String[] args) {
		A t = new A();
		t.solve();
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alex
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }
    static class TaskA {
        boolean f(int i1, int j1, int i2, int j2) {
            if (i1 == i2 && j1 == j2) return false;
            return Math.abs(i1 - i2) + Math.abs(j1 - j2) <= 1;
        }
        int good(int n) {
            boolean[][] taken = new boolean[n][n];
            for (int i = 0; i < n; i++) {
                outer:
                for (int j = 0; j < n; j++) {
                    if (f(i, j, n - i - 1, j) || f(i, j, i, n - j - 1) || f(i, j, n - i - 1, n - j - 1)) {
                        continue;
                    }
                    for (int k = 0; k < 4; k++) {
                        int ni = i + MiscUtils.DX4[k];
                        int nj = j + MiscUtils.DY4[k];
                        if (MiscUtils.isValidCell(ni, nj, n, n)) {
                            if (taken[ni][nj]) {
                                continue outer;
                            }
                        }
                    }
                    taken[i][j] = true;
                }
            }
            int res = 0;
            for (boolean[] bb : taken) for (boolean b : bb) if (b) res++;
            return res;
        }
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int x = in.readInt();
            for (int side = 1; side <= 1000; side++) {
                int can = good(side);
                if (can < x) continue;
                if (x % 4 == 0) {
                    out.printLine(side);
                    return;
                }
                if (x % 4 == 1) {
                    if (can % 4 == 1) {
                        out.printLine(side);
                        return;
                    }
                }
                if (x % 4 == 2) {
                    if (side % 2 == 1) {
                        out.printLine(side);
                        return;
                    }
                }
                if (x % 4 == 3) {
                    if (side % 2 == 1) {
                        if (side >= 5) {
                            out.printLine(side);
                            return;
                        }
                    }
                }
            }
        }
    }
    static class OutputWriter {
        private final PrintWriter writer;
        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }
        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }
        public void close() {
            writer.close();
        }
        public void printLine(int i) {
            writer.println(i);
        }
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;
        public InputReader(InputStream stream) {
            this.stream = stream;
        }
        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }
        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    static class MiscUtils {
        public static final int[] DX4 = {1, 0, -1, 0};
        public static final int[] DY4 = {0, -1, 0, 1};
        public static boolean isValidCell(int row, int column, int rowCount, int columnCount) {
            return row >= 0 && row < rowCount && column >= 0 && column < columnCount;
        }
    }
}

import java.util.*;
public class Main {

    private void doit(){
        Scanner sc = new Scanner (System.in);
        while(sc.hasNext()){
            int x = sc.nextInt();
            int res = solve(x) * 2 -1;
            System.out.println(res);
        }
    }

    private int solve(int x){
        if(x == 1) return 1;
        if(x==2||x==4||x==5) return 2;
        int sum=5;
        for(int i=3;i < 1000;i++){
            int len = i * 2 -1;
            int inc = (len / 2 + 1) * 4 -4;
            sum += inc;
            if(sum >= x) return i;
            //System.out.println("sum= " + sum + "inc = " + inc + " len= " + len);
        }
        return -1;
    }

    public static void main(String[] args) {
        Main obj = new Main();
        obj.doit();
    }
}

import java.util.Scanner;

public class Main {

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

        int x = sc.nextInt();

        if (x==3)
            System.out.print(5);
        else
        {
            int i = 1;
            while(true)
            {
                if (i*i/2+1 >= x)
                {
                    System.out.print(i);
                    break;
                }
                i+=2;
            }
        }
    }
}

import java.io.BufferedReader;

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.ArrayList;
import java.util.TreeSet;
import java.util.Collections;

public class Hello
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)
    {
        FastReader in=new FastReader();

        //start code here
        int x=in.nextInt();
        if(x==3)
        	System.out.print("5");
        else
        {
        	for(int i=0;i<100010;++i)
        	{
        		if(x<=(4*i*i+4*i+2)/2)
        		{
        			System.out.print(2*i+1);
        			break;
        		}
        	}
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.HashMap;
import java.util.Map.Entry;

public class C {

    private StreamTokenizer in;
    private PrintWriter out;

    public static void main (String[] args) throws IOException {
        new C().solve();
    }

    int nextInt () throws IOException {
        in.nextToken();
        return (int)in.nval;
    }

    void solve () throws IOException {
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(new OutputStreamWriter(System.out));

        int n = nextInt();
        if (n == 1) {
            out.print(1);
            out.flush();
            return;
        }
        if (n == 3) {
            out.print(5);
            out.flush();
            return;
        }

        int i = 3;
        while (true) {
            int res = (int)Math.pow(i / 2, 2) + (int)Math.pow((i / 2) + 1, 2);
            if (res >= n) {
                out.print(i);
                out.flush();
                return;
            }
            i += 2;
        }
    }

}

import java.util.*;
import java.io.*;

public class ClearSymmetry {

	// https://codeforces.com/contest/202/problem/C

	public static void main(String[] args) throws IOException, FileNotFoundException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		//BufferedReader in = new BufferedReader(new FileReader("ClearSymmetry"));

		int n = Integer.parseInt(in.readLine());
		if (n == 3) {
			System.out.println(5);
			return;
		}
		int max =n;
		int min = 1;
		while (min < max) {
			int middle = (max+min)/2;
			if (middle %2 ==0) {
				middle--;
			}
			if (works(n, middle)) {
				max=  middle;
			}
			else min = middle+2;
		}
		System.out.println(min);
	}

	public static boolean works(int n, int num) {
		if (num == 1) {
			if (n == 1) return true;
			else return false;
		}
		if (num == 3) {
			if (n <= 5) return true;
			else return false;
		}
		num /= 2;
		int count=0;
		boolean odd = false;
		for (int i=0; i<num; i++) {
			for (int j= odd ? 1 : 0; j<num; j+=2) {
				count++;
			}
			odd = !odd;
		}
		for (int i=0; i<num-1; i+=2) {
			count++;
		}
		//if (num %2 == 1) count--;
		if (count *4+1 >= n) return true;
		return false;
	}
}

import java.io.*;
import java.util.*;

public class Matrix {
	void solve() throws IOException {
		int x = nextInt();

		int n;

		if (x == 3) {
			n = 5;
		} else {
			int s = 2 * x;
			if (x % 2 == 1) {
				s--;
			}

			double sqrt = Math.pow((double) s, 0.5);
			sqrt = Math.floor(sqrt);

			n = (int) sqrt;
			if (n * n != s) {
				n++;
			}

			if (n % 2 == 0) {
				n++;
			}
		}

		out.println(n);
	}

	void run() throws IOException {
		//reader = new BufferedReader(new FileReader("B-large.in"));
		reader = new BufferedReader(new InputStreamReader(System.in));
		tokenizer = null;
		//out = new PrintWriter(new FileWriter("B-large.out"));
		out = new PrintWriter(new OutputStreamWriter(System.out));
		solve();
		reader.close();
		out.flush();
	}

	public static void main(String[] args) throws IOException {
		new Matrix().run();
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter out;

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) throws Exception
    {

        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        for (int n = 1 ; ; n += 2){
            if (((n >> 1) & 1) == 0){
                int can = 1 + ((((n >> 1) + 1) * (n >> 1 >> 1) + ((n >> 1)) * (n >> 1 >> 1)) << 1);
                can += ((n >> 1));
                if (can >= x) {
                    System.out.println(n);
                    break;
                }

            }
            else {
                int can = 1 + ((((n >> 1) + 1) * (n >> 1 >> 1) + (((n >> 1)) * ((n >> 1 >> 1) + 1))) << 1);

                can += ((n >> 1) + 1);
                if (can >= x) {
                    if (x == 3) n += 2;
                    System.out.println(n);
                    break;
                }
            }

        }
    }
}

import java.util.*;

public class ClearSymmetry {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		if(x==1){
			System.out.println(1);
		}
		if(x==2){
			System.out.println(3);
		}
		if(x==3){
			System.out.println(5);
		}
		if(x==4){
			System.out.println(3);
		}
		if(x==5){
			System.out.println(3);
		}
		if(x==6){
			System.out.println(5);
		}
		if(x>=7){
			for(int k=0; true; k++){
				if(2*k*k+2*k+1>=x){
					System.out.println(2*k+1);
					return;
				}
			}
		}
	}
}

import java.io.*;
import java.util.StringTokenizer;

public class _201A {

    public static void main(String[] args) throws Exception {
        Reader.init(System.in);
        BufferedWriter cout = new BufferedWriter(new OutputStreamWriter(System.out));

        int n = Reader.nextInt();
        int len = 0;
        for (len = 1; (len * len + 1) / 2 < n; len += 2) ;
        if (n == 3) len = 5;
        System.out.println(len);

        cout.close();
    }

    static class Pair<U extends Comparable<U>, V extends Comparable<V>> implements Comparable<Pair<U, V>> {
        final U _1;
        final V _2;

        private Pair(U key, V val) {
            this._1 = key;
            this._2 = val;
        }

        public static <U extends Comparable<U>, V extends Comparable<V>> Pair<U, V> instanceOf(U _1, V _2) {
            return new Pair<U, V>(_1, _2);
        }

        @Override
        public String toString() {
            return _1 + " " + _2;
        }

        @Override
        public int hashCode() {
            int res = 17;
            res = res * 31 + _1.hashCode();
            res = res * 31 + _2.hashCode();
            return res;
        }

        @Override
        public int compareTo(Pair<U, V> that) {
            int res = this._1.compareTo(that._1);
            if (res < 0 || res > 0) return res;
            else return this._2.compareTo(that._2);
        }

        @Override
        public boolean equals(Object obj) {
            if (this == obj) return true;
            if (!(obj instanceof Pair)) return false;
            Pair<?, ?> that = (Pair<?, ?>) obj;
            return _1.equals(that._1) && _2.equals(that._2);
        }
    }

    /**
     * Class for buffered reading int and double values
     */
    static class Reader {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

        /**
         * call this method to initialize reader for InputStream
         */
        static void init(InputStream input) {
            reader = new BufferedReader(new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }

        /**
         * get next word
         */
        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                // TODO add check for eof if necessary
                tokenizer = new StringTokenizer(reader.readLine());
            }
            return tokenizer.nextToken();
        }

        static int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
    }

    static class ArrayUtil {
        static void swap(int[] a, int i, int j) {
            int tmp = a[i];
            a[i] = a[j];
            a[j] = tmp;
        }

        static void swap(long[] a, int i, int j) {
            long tmp = a[i];
            a[i] = a[j];
            a[j] = tmp;
        }

        static void swap(double[] a, int i, int j) {
            double tmp = a[i];
            a[i] = a[j];
            a[j] = tmp;
        }

        static void swap(char[] a, int i, int j) {
            char tmp = a[i];
            a[i] = a[j];
            a[j] = tmp;
        }

        static void swap(boolean[] a, int i, int j) {
            boolean tmp = a[i];
            a[i] = a[j];
            a[j] = tmp;
        }

        static void reverse(int[] a, int i, int j) {
            for (; i < j; i++, j--)
                swap(a, i, j);
        }

        static void reverse(long[] a, int i, int j) {
            for (; i < j; i++, j--)
                swap(a, i, j);
        }

        static void reverse(double[] a, int i, int j) {
            for (; i < j; i++, j--)
                swap(a, i, j);
        }

        static void reverse(char[] a, int i, int j) {
            for (; i < j; i++, j--)
                swap(a, i, j);
        }

        static void reverse(boolean[] a, int i, int j) {
            for (; i < j; i++, j--)
                swap(a, i, j);
        }

        static long sum(int[] a) {
            int sum = 0;
            for (int i : a)
                sum += i;
            return sum;
        }

        static long sum(long[] a) {
            long sum = 0;
            for (long i : a)
                sum += i;
            return sum;
        }

        static double sum(double[] a) {
            double sum = 0;
            for (double i : a)
                sum += i;
            return sum;
        }

        static int max(int[] a) {
            int max = Integer.MIN_VALUE;
            for (int i : a)
                if (i > max) max = i;
            return max;
        }

        static int min(int[] a) {
            int min = Integer.MAX_VALUE;
            for (int i : a)
                if (i < min) min = i;
            return min;
        }

        static long max(long[] a) {
            long max = Long.MIN_VALUE;
            for (long i : a)
                if (i > max) max = i;
            return max;
        }

        static long min(long[] a) {
            long min = Long.MAX_VALUE;
            for (long i : a)
                if (i < min) min = i;
            return min;
        }
    }
}

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        InputStream inputStream=System.in;
        /*
        try{
            inputStream=new FileInputStream("input.txt");
        } catch (IOException e){throw new RuntimeException(e);}
        //*/
        OutputStream outputStream=System.out;
        InputReader in=new InputReader(inputStream);
        PrintWriter out=new PrintWriter(outputStream);
        Task solver=new Task();
        solver.run(in,out);
        out.close();
    }

}

class Task{
    public void run(InputReader in, PrintWriter out){
        int x=in.nextInt(),n,y,s;
        n=x/4;
        if (x==2){out.println(3); return;}
        //if (x==3){out.println(5); return;}
        for (int i=0;i<=x*2+1;i++){
            y=(i*i+1)/2;
            s=i/2;
            if (x%4>1) s--;
            if (s<0) continue;
            y+=s;
            if (y>=n) {out.println(i*2+1); return;}
        }
    }
}

class InputReader{
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream){
        reader=new BufferedReader(new InputStreamReader(stream));
        tokenizer=null;
    }
    public String next(){
        while (tokenizer==null||!tokenizer.hasMoreTokens()){
            try{
                tokenizer=new StringTokenizer(reader.readLine());
            } catch (IOException e){
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }
    public int nextInt(){
        return Integer.parseInt(next());
    }
}

import java.io.*;
import java.util.*;
import java.math.*;

import static java.lang.Math.*;

public class Main implements Runnable {

	Set<Integer> possible = new TreeSet<Integer>();

	void backtrack(int n, BitSet arr, int count, int pos) {
		possible.add(count);
		int sqsize = n % 2 == 1 ? (n + 1) / 2 : n / 2 - 1;
		if (sqsize == 0) {
			return;
		}
		/*
		for (int i = 0; i < sqsize; i++) {
			for (int j = 0; j < sqsize; j++) {
				out.print(arr.get(i * sqsize + j) ? 1 : 0);
			}
			out.println();
		}
		out.println();
		*/
		for (int ii = pos; ii < sqsize * sqsize; ii++) {
			int i = ii / sqsize;
			int j = ii % sqsize;
			if (i > 0 && arr.get((i - 1) * sqsize + j)) {
				continue;
			}
			if (j > 0 && arr.get(i * sqsize + j - 1)) {
				continue;
			}
			BitSet clone = (BitSet)arr.clone();
			clone.set(i * sqsize + j);
			int newcount = count;
			if (n % 2 == 1) {
				if (i == 0 && j == 0) {
					newcount += 1;
				} else if (i == 0 || j == 0) {
					newcount += 2;
				} else {
					newcount += 4;
				}
			} else {
				newcount += 4;
			}
			backtrack(n, clone, newcount, ii + 1);
		}
	}

	void solve() throws Exception {
		/*
		int x = sc.nextInt();
		if (x % 4 == 0) {
			for (int i = 1; ; i++) {
				if (i * i / 2 >= x) {
					out.println(x);
					return;
				}
				//out.println(i * i / 2);
			}
		} else if (x % 4 == 1) {
			for (int i = 1; ; i += 2) {

			}
		}
		*/
		/*
		for (int i = 14; i <= 14; i++) {
			possible = new TreeSet<Integer>();
			int n = i;
			int sqsize = n % 2 == 1 ? (n + 1) / 2 : n / 2 - 1;
			int count = 0;
			int pos = 0;
			backtrack(n, new BitSet(sqsize * sqsize), count, pos);
			out.print(i + ": ");
			for (int num : possible) {
				out.print(num + " ");
			}
			out.println();
			out.flush();
		}
		*/
		int x = sc.nextInt();
		if (x == 3) {
			out.println(5);
			return;
		}
		for (int i = 1, max = 1; i < 100; i += 2) {
			if (max >= x) {
				out.println(i);
				return;
			}
			max += (i + 1) / 2 * 4;
		}
	}

	BufferedReader in;
	PrintWriter out;
	FastScanner sc;

	static Throwable uncaught;

	@Override
	public void run() {
		try {
			//System.setOut(new PrintStream("test.txt"));
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			sc = new FastScanner(in);
			solve();
		} catch (Throwable t) {
			Main.uncaught = t;
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) throws Throwable {
		Thread t = new Thread(null, new Main(), "", 128 * 1024 * 1024);
		t.start();
		t.join();
		if (uncaught != null) {
			throw uncaught;
		}
	}

}

class FastScanner {

	BufferedReader reader;
	StringTokenizer strTok;

	public FastScanner(BufferedReader reader) {
		this.reader = reader;
	}

	public String nextToken() throws IOException {
		while (strTok == null || !strTok.hasMoreTokens()) {
			strTok = new StringTokenizer(reader.readLine());
		}
		return strTok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

}

import java.util.Scanner;

public class Clear {

    public static void main(String[] args) {
        // TODO Auto-generated method stub

        Scanner in = new Scanner(System.in);

            int x = in.nextInt();
            int n=1;
            int point;
            if(x==3)
                n=5;
            else{
                  point=1;
                  while (point<x)
                  {
                    n+=2;
                    point=(n*n+1)/2;
                  }
            }

            System.out.println(n);

    }//main
}//class

import java.io.*;
import java.util.*;
import java.math.*;
import java.text.*;
public class Main1 {
    public static class Node implements Comparable<Node>
    {
        int value;
        int iteration;
        int centros;
        public Node(int value, int interation, int centros)
        {
            this.value = value;
            this.iteration = interation;
            this.centros = centros;
        }
        @Override
        public int compareTo(Node o) {
            // TODO Auto-generated method stub
            return new Integer(iteration).compareTo(o.iteration);
        }

    }
public static void main(String[] args) throws IOException {
    BufferedReader in;
    StringBuilder out = new StringBuilder();
    File file = new File("inpu.txt");
    if (file.exists())
        in = new BufferedReader(new FileReader(file));
    else
        in = new BufferedReader(new InputStreamReader(System.in));
    String line, lines[];
    PriorityQueue<Node> p = new PriorityQueue<Node>();

    p.add(new Node(0, 0, 0));
    p.add(new Node(1, 0, 1));
    p.add(new Node(3, 2, 1));
    int av, ai;
    Node aux;
    boolean visited[] = new boolean[101];
    int sizes[] = new int[101];
    int iter;
    int cap;
    while(!p.isEmpty())
    {
        aux = p.poll();
        if ( aux.value > 100 ) continue;
        if ( visited[aux.value] ) continue;
        visited[aux.value] = true;
        sizes[aux.value] = 2*aux.iteration+1;
        iter = aux.iteration+1;
        cap = iter*4;
        int vv = 0;
        while( vv <= cap )
        {
            p.add(new Node(vv+aux.value, iter, 0));
            vv+=4;
        }
        if ( aux.centros == 0)
        {
            vv = 2;
            while( vv <= cap )
            {
                p.add(new Node(vv+aux.value, iter, 1));
                vv+=4;
            }
        }

    }
    //int n = Integer.parseInt(in.readLine());
    //System.out.println("hola "+n);
    System.out.println(sizes[Integer.parseInt(in.readLine())]);
}
}

import java.io.*;
import java.util.*;

public class A {

	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;
	boolean eof;

	boolean can(int n, int set) {
		if ((n % 2) == 0) {
			if ((set % 4) != 0)
				return false;
			int tmp = n / 2 - 1;
			tmp = (tmp * tmp + 1) / 2;
			return set / 4 <= tmp;
		}
		if (n == 1)
			return set <= 1;
		if (n == 3)
			return set <= 5 && set != 3;
		int tmp = n / 2;

		int max4 = (tmp * tmp + 1) / 2;

		int maxRes = max4 * 4 + (tmp / 2) * 4 + 1;
		return set <= maxRes;
	}

	void solve(int need) throws IOException {
		for (int sz = 1; true; sz++)
			if (can(sz, need)) {
				//out.print(need + " ");
				out.println(sz);
				return;
			}
	}

	void inp() throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
//		for (int n = 1; n <= 100; n++)
//			solve(n);
		solve(nextInt());
		out.close();
	}

	public static void main(String[] args) throws IOException {
		new A().inp();
	}

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return null;
			}
		}
		return st.nextToken();
	}

	String nextString() {
		try {
			return br.readLine();
		} catch (IOException e) {
			eof = true;
			return null;
		}
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
}

import java.util.List;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Comparator;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.Collection;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int x = in.nextInt();
        if (x == 1) out.printLine(1);
        else if (x == 2) out.printLine(3);
        else if (x == 3) out.printLine(5);
        else {
            int t = (int) Math.sqrt(2 * x - 1);
            //out.printLine("t = " + t);
            if (NumUtils.isSquare(2 * x - 1)) {
                out.printLine(t);
            }
            else {
                if (t % 2 == 0)
                    out.printLine(t + 1);
                else
                    out.printLine(t + 2);
            }
        }
    }
}

class InputReader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
		return Integer.parseInt(next());
	}

	}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(outputStream);
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }
}

class NumUtils {

    public static boolean isSquare(long n) {
        int t = (int) Math.sqrt(n);
        if (t * t == n)
            return true;
        else
            return false;
    }

    }

import java.io.*;
import java.util.*;
import java.util.function.*;
import java.lang.*;

public class Main {
    final static String fileName = "";
    final static boolean useFiles = false;

    public static void main(String[] args) throws FileNotFoundException {
        InputStream inputStream;
        OutputStream outputStream;
        if (useFiles) {
            inputStream = new FileInputStream(fileName + ".in");
            outputStream = new FileOutputStream(fileName + ".out");
        } else {
            inputStream = System.in;
            outputStream = System.out;
        }
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task(in, out);
        Debug.out = out;
        solver.solve();
        out.close();
    }
}
class Task {
    public void solve() {
        int x = in.nextInt();
        if (x == 3) {
            out.print(5);
            return;
        }
        for (int i = 1; i <= Math.max(3 * x, 10); i += 2){
            int sum = 0;
            for (int j = 1; j < i; j += 2)
                sum += 2 * j;
            sum += i;
            if (sum >= x) {
                out.println(i);
                return;
            }
        }
    }

    private InputReader in;
    private PrintWriter out;

    Task(InputReader in, PrintWriter out) {
        this.in = in;
        this.out = out;
    }
}

class Debug {
    public static PrintWriter out;

    public static void printObjects(Object... objects) {
        out.println(Arrays.deepToString(objects));
        out.flush();
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public double nextDouble(){
        return Double.parseDouble(next());
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong(){
        return Long.parseLong(next());
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br1 = new BufferedReader(
				new InputStreamReader(System.in));
		int sharpness = Integer.parseInt(br1.readLine());
		if (sharpness == 1) {
			System.out.println(1);
			return;
		} else if (sharpness == 2) {
			System.out.println(3);
			return;
		} else if (sharpness == 3) {
			System.out.println(5);
			return;
		} else if (sharpness == 4) {
			System.out.println(3);
			return;
		} else if (sharpness == 5) {
			System.out.println(3);
			return;
		} else {
			int max = 2 * sharpness - 1;
			int result = (int) Math.ceil(Math.sqrt(max));
			result = result%2==0? result+1:result;
			System.out.println(result);
		}

	}
}

import java.io.*;
import java.text.*;
import java.util.*;
import java.math.*;

public class C {
	static int rec(int n) {
		if(n % 2 == 1)
			return ((n * n) / 2 +1);
		else return (n * n / 2);
	}
	private static void solve() throws IOException {
		int x = nextInt();
		boolean w = false;
		if(x == 1) {
			out.println(1);
			return;
		}
		if(x == 1 || x == 2 || x == 4 || x == 5) {
			out.println(3);
			return;
		}
		for(int n = 4; ; n++) {
			if(n % 2 == 0) {
				int max = 4 * rec(n/2 - 1);
				if(x % 4 == 0 && x <= max) {
					w = true;
				}
			}
			else {
				int max = rec(n);
				if(x <= max)
					w = true;
			}
			if(w) {
				out.println(n);
				return;
			}
		}
	}

	public static void main(String[] args) {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(239);
		}
	}

	static BufferedReader br;
	static StringTokenizer st;
	static PrintWriter out;

	static String nextToken() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			String line = br.readLine();
			if (line == null) {
				return null;
			}
			st = new StringTokenizer(line);
		}
		return st.nextToken();
	}

	static int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	static long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	static double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
}
class Info implements Comparable<Info>{
	int gf, go, w;
	Info(int f, int o, int w) {
		gf = f;
		go = o;
		this.w = w;
	}
	public int compareTo(Info o) {
		if(this.w > o.w)
			return 1;
		else if(this.w < o.w)
			return -1;
		else if(this.gf - this.go < o.gf - o.go)
			return -1;
		else if(this.gf - this.go > o.gf - o.go)
			return 1;
		else if(this.gf < o.gf)
			return -1;
		else if(this.gf > o.gf)
			return 1;
		else
			return 0;
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Random;
import java.util.StringTokenizer;

public class Contest {
	private static PrintWriter out = new PrintWriter(System.out);
	private static final Random random = new Random();
	private static int n, m, k, tc, x;
	private static int[] a;
	private static final int OO = (int) 1e9;
	long MAX = (int) (1e5 + 10);

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		x = sc.nextInt();
		// n^2/2 = x
		if (x == 3) {
			System.out.println(5);
			return;
		}
		int st = 0, en = 100, ans = -1;
		while (st <= en) {
			int mid = st + (en - st) / 2;
			if (((mid * mid) / 2) + 1 >= x) {
				en = mid - 1;
				ans = mid;
			} else {
				st = mid + 1;
			}
		}
		System.out.println(ans % 2 == 0 ? ans + 1 : ans);
		out.flush();

	}

	private static void ruffleSort(int[] a) {
		int n = a.length;// shuffle, then sort
		for (int i = 0; i < n; i++) {
			int oi = random.nextInt(n), temp = a[oi];
			a[oi] = a[i];
			a[i] = temp;
		}
		java.util.Arrays.sort(a);
	}

	private static class Scanner {
		public BufferedReader reader;
		public StringTokenizer st;

		public Scanner(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream));
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					String line = reader.readLine();
					if (line == null)
						return null;
					st = new StringTokenizer(line);
				} catch (Exception e) {
					throw (new RuntimeException());
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}
	}

}

import java.io.BufferedReader;
import java.io.InputStreamReader;
//import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

//import JaCoP.constraints.Sum;
//import JaCoP.constraints.XeqY;
//import JaCoP.core.IntVar;
//import JaCoP.core.Store;
//import JaCoP.search.DepthFirstSearch;
//import JaCoP.search.IndomainMin;
//import JaCoP.search.InputOrderSelect;
//import JaCoP.search.Search;
//import JaCoP.search.SelectChoicePoint;

public class CodeFR
{
	static class Scanner
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");

		public String nextLine()
		{
			try
			{
				return br.readLine();
			}
			catch(Exception e)
			{
				throw(new RuntimeException());
			}
		}

		public String next()
		{
			while(!st.hasMoreTokens())
			{
				String l = nextLine();
				if(l == null)
					return null;
				st = new StringTokenizer(l);
			}
			return st.nextToken();
		}

		public int nextInt()
		{
			return Integer.parseInt(next());
		}

		public long nextLong()
		{
			return Long.parseLong(next());
		}

		public double nextDouble()
		{
			return Double.parseDouble(next());
		}

		public int[] nextIntArray(int n)
		{
			int[] res = new int[n];
			for(int i = 0; i < res.length; i++)
				res[i] = nextInt();
			return res;
		}

		public long[] nextLongArray(int n)
		{
			long[] res = new long[n];
			for(int i = 0; i < res.length; i++)
				res[i] = nextLong();
			return res;
		}

		public double[] nextDoubleArray(int n)
		{
			double[] res = new double[n];
			for(int i = 0; i < res.length; i++)
				res[i] = nextLong();
			return res;
		}
		public void sortIntArray(int[] array)
		{
			Integer[] vals = new Integer[array.length];
			for(int i = 0; i < array.length; i++)
				vals[i] = array[i];
			Arrays.sort(vals);
			for(int i = 0; i < array.length; i++)
				array[i] = vals[i];
		}

		public void sortLongArray(long[] array)
		{
			Long[] vals = new Long[array.length];
			for(int i = 0; i < array.length; i++)
				vals[i] = array[i];
			Arrays.sort(vals);
			for(int i = 0; i < array.length; i++)
				array[i] = vals[i];
		}

		public void sortDoubleArray(double[] array)
		{
			Double[] vals = new Double[array.length];
			for(int i = 0; i < array.length; i++)
				vals[i] = array[i];
			Arrays.sort(vals);
			for(int i = 0; i < array.length; i++)
				array[i] = vals[i];
		}

		public String[] nextStringArray(int n)
		{
			String[] vals = new String[n];
			for(int i = 0; i < n; i++)
				vals[i] = next();
			return vals;
		}
	}

//	static void addEq(Store s, IntVar a, IntVar b, boolean equal)
//	{
//		if(a == b)
//			return;
//		if(equal)
//			s.impose(new XeqY(a, b));
//		else
//		{
//			IntVar p = new IntVar(s, 0, 1);
//			todas.add(p);
//			s.impose(new Sum(new IntVar[]{a, b}, p));
//		}
//	}
//
//	static void intentarLink(Store s, IntVar a, IntVar[][] vars, int i, int j)
//	{
//		if(i < 0 || i >= vars.length || j < 0 || j >= vars.length)
//			return;
//		addEq(s, a, vars[i][j], false);
//	}
//
//	static ArrayList <IntVar> todas;
//
//	static boolean intentar(int size, int x)
//	{
//		Store store = new Store();
//		IntVar[][] variables = new IntVar[size][size];
//		todas = new ArrayList <IntVar> ();
//		for(int i = 0; i < size; i++)
//			for(int j = 0; j < size; j++)
//			{
//				variables[i][j] = new IntVar(store, 0, 1);
//				todas.add(variables[i][j]);
//			}
//		IntVar[] todasNormales = todas.toArray(new IntVar[0]);
//		for(int i = 0; i < size; i++)
//			for(int j = 0; j < size; j++)
//			{
//				intentarLink(store, variables[i][j], variables, i - 1, j);
//				intentarLink(store, variables[i][j], variables, i + 1, j);
//				intentarLink(store, variables[i][j], variables, i, j + 1);
//				intentarLink(store, variables[i][j], variables, i, j - 1);
//			}
//		for(int i = 0; i < size; i++)
//			for(int j = 0; j < size; j++)
//			{
//				addEq(store, variables[i][j], variables[size - i - 1][j], true);
//				addEq(store, variables[i][j], variables[i][size - j - 1], true);
//			}
//		IntVar suma = new IntVar(store, x, x);
//		todas.add(suma);
//		store.impose(new Sum(todasNormales, suma));
//		Search<IntVar> search = new DepthFirstSearch<IntVar>();
//		search.setPrintInfo(false);
//		SelectChoicePoint<IntVar> select =
//		new InputOrderSelect<IntVar>(store, todas.toArray(new IntVar[0]),
//		new IndomainMin<IntVar>());
//		return search.labeling(store, select);
//	}

	static int solve(int val)
	{
		if(val == 1)
			return 1;
		if(val == 2)
			return 3;
		if(val == 3)
			return 5;
		if(val < 6)
			return 3;
		if(val < 14)
			return 5;
		if(val < 26)
			return 7;
		if(val < 42)
			return 9;
		if(val < 62)
			return 11;
		if(val < 86)
			return 13;
		else
			return 15;
	}

	public static void main(String[] args)
	{
		Scanner sc = new Scanner();
//		int[] ans = new int[101];
//		for(int i = 1; i <= 100; i++)
//		{
//			for(int tam = 1; true; tam++)
//			{
//				if((tam & 1) == 0)
//					continue;
//				if(intentar(tam, i))
//				{
//					ans[i] = tam;
//					System.out.println(i + ": " + tam + " " + solve(i));
//					break;
//				}
//			}
//		}
		System.out.println(solve(sc.nextInt()));
	}

}

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class ProblemA {

	public static void main(String[] args) {
		new ProblemA().solve();
	}

	private void solve() {

		Scanner in = new Scanner(new BufferedInputStream(System.in));
		PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

		int n = solve(in.nextInt());

		out.println(n);
		out.flush();
		out.close();
	}

	private int solve(int x) {
		if (x == 2) return 3;
		if (x == 3) return 5;

		if (x % 2 == 1) {
			x--;
		}
		boolean isTwo = false;
		if (x % 4 > 0) {
			x -= 2;
			isTwo = true;
		}
		int n = 1;
		int m = 4;
		while (x > 0) {
			n += 2;
			if (x >= m) {
				x -= m;
				m += 4;
			} else {
				x = -1;
			}
		}
		if (x == 0 && isTwo) {
			n += 2;
		}
		return n;
	}
}

/**
 * Created with IntelliJ IDEA.
 * User: vaibhav mittal
 * Date: 29/6/12
 * Time: 9:35 PM
 * To change this template use File | Settings | File Templates.
 */
import java.io.*;
import java.util.*;
import java.math.*;

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

        Task solver = new Task();
        int testCases = 1;
        for (int i = 1; i <= testCases; ++i)
            solver.solve(i, in, out);

        in.close();
        out.close();
    }
}

class Task {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        int x = in.nextInt();
        if (x == 2) {
            out.println("3");
            return;
        }
        for (int n = 1; ; n += 2) {
            int m = n / 2;
            for (int a = 0; a <= (m * m + 1) / 2; ++a) {
                for (int b = 0; b <= m / 2; ++b) {
                    for (int c = 0; c <= m / 2; ++c) {
                        int sum = 4 * a + 2 * b + 2 * c;
                        if (sum == x || sum + 1 == x) {
                            out.println(n);
                            return;
                        }
                    }
                }
            }
        }
    }
}

import java.util.ArrayList;

import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;
import java.util.Vector;

public class Sourcecode {

    public static void main(String[] args) {

     Scanner input = new Scanner(System.in);
     int numberofones=input.nextInt();
     int result = getanswer(numberofones);
     System.out.println(result);
    }

    private static ArrayList<Integer> canhaveone(int side){
        ArrayList<Integer> answer= new ArrayList<Integer>();
        if(side%2==0){
            answer=canhaveone(side-1);
        }
        else{
            int havemost=(int) (Math.pow(side/2, 2)+Math.pow(side/2+1, 2));
            for(int i=1;i<=havemost;i++){
                if(side==3&&i==3) continue;
                answer.add(i);
            }

        }
        return answer;
    }

    private static int getanswer(int numberofones) {
        int answer=tryout(numberofones);
        return answer;
    }

    private static int tryout(int numberofone) {
        int end=(2*numberofone-1)*(2*numberofone-1);
        int answer=end;
        for(int i=1;i<=end;i++){
            if(canhaveone(i).contains(numberofone)){
                answer=i;
                break;
            }
        }
        return answer;
    }

}

    import java.util.*;
    import java.io.*;
    import java.math.*;

    public class C {
        public static Scanner scan = new Scanner(System.in);
        public static boolean bg = true;

        public static void main(String[] args) throws Exception {
            TreeMap<Integer,Integer> odd = new TreeMap();
            int cur = 1;
            for (int i=1;i<=100;i+=2){
                odd.put(cur, i);
                cur+=(i+1)*2;
            }

            TreeMap<Integer,Integer> even = new TreeMap();
            for (int i=2;i<=100;i+=2){
                int k1 = i/4;
                int add1 = k1*k1*4;

                int k2 = (i-1)/4;
                int add2 = k2*k2*4;
                even.put(add1+add2, i);
            }
            //if (bg) System.out.println(odd);
            //if (bg) System.out.println(even);
            int k1 = Integer.parseInt(scan.next());
            System.out.println(ans(k1));

        }
        public static int ans (int n1){
            if (n1==1) return 1;
            if (n1%4==0){
                int k1 = n1/4;
                for (int i=0;i<=1000;i++){
                    k1 -= i;
                    if (k1<=0) return i*2+1;
                }
            }
            else if (n1%4==1){

                return ans(n1-1);
            }
            else if (n1%4==2){
                return (ans(n1+2));
            }
            else if (n1%4==3){
                if (n1==3) return 5;
                else {
                    return (ans(n1+2));
                }
            }
            return -1;
        }
    }

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class P202C {

    static boolean multipleIndependent = false;

    void run() {
        int x = in.nextInt();
        if (x == 3) {
            out.println(5);
        } else {
            for (int i = 1;; i += 2) {
                if (i * (i + 1) / 2 - i / 2 >= x) {
                    out.println(i);
                    break;
                }
            }
        }
    }

    /* -----: Template :----- */
    static InputReader in = new InputReader(System.in);
    static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) {
        int q = multipleIndependent ? in.nextInt() : 1;
        while (q-- > 0) {
            new P202C().run();
        }
        out.flush();
        out.close();
    }

    static class InputReader {

        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            int bufferSize = 32 * 1024;
            reader = new BufferedReader(new InputStreamReader(stream), bufferSize);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() {
            if (true) {
                throw new RuntimeException("nextLine: not tested");
            }
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            StringBuilder sb = new StringBuilder();
            return tokenizer.nextToken("\n");
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }

        public int[][] nextIntMap(int n, int m) {
            int[][] map = new int[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = nextIntArray(m);
            }
            return map;
        }

        public long[][] nextLongMap(int n, int m) {
            long[][] map = new long[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = nextLongArray(m);
            }
            return map;
        }

        public char[][] nextCharMap(int n) {
            char[][] map = new char[n][];
            for (int i = 0; i < n; i++) {
                map[i] = next().toCharArray();
            }
            return map;
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class ClearSymmetry {

    static final int MAX = 250;

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);

        int x = in.nextInt();

        for (int i = 1; i < MAX; i += 2) {
            int maxHold = (i * i) / 2 + 1;
            if (maxHold >= x) {
                if (i == 3 && x == 3)
                    continue;
                System.out.println(i);
                break;
            }
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = new StringTokenizer("");
        }

        public String next() {
            try {
                while (!tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }

            return tokenizer.nextToken();
        }

        public String nextLine() {
            String line = null;
            try {
                tokenizer = new StringTokenizer("");
                line =  reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        boolean hasNext() {
            while (!tokenizer.hasMoreTokens()) {
                String line = nextLine();
                if (line == null) return false;
                tokenizer = new StringTokenizer(line);
            }
            return true;
        }
    }
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Template implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Exception e) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
    }

    class GraphBuilder {
        int n, m;
        int[] x, y;
        int index;
        int[] size;

        GraphBuilder(int n, int m) {
            this.n = n;
            this.m = m;
            x = new int[m];
            y = new int[m];
            size = new int[n];
        }

        void add(int u, int v) {
            x[index] = u;
            y[index] = v;
            size[u]++;
            size[v]++;
            index++;
        }

        int[][] build() {
            int[][] graph = new int[n][];
            for (int i = 0; i < n; i++) {
                graph[i] = new int[size[i]];
            }
            for (int i = index - 1; i >= 0; i--) {
                int u = x[i];
                int v = y[i];
                graph[u][--size[u]] = v;
                graph[v][--size[v]] = u;
            }
            return graph;
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    int[] readIntArray(int size) throws IOException {
        int[] res = new int[size];
        for (int i = 0; i < size; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long[] readLongArray(int size) throws IOException {
        long[] res = new long[size];
        for (int i = 0; i < size; i++) {
            res[i] = readLong();
        }
        return res;
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    <T> List<T>[] createGraphList(int size) {
        List<T>[] list = new List[size];
        for (int i = 0; i < size; i++) {
            list[i] = new ArrayList<>();
        }
        return list;
    }

    public static void main(String[] args) {
        new Template().run();
        // new Thread(null, new Template(), "", 1l * 200 * 1024 * 1024).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            if (System.getProperty("ONLINE_JUDGE") == null) {
                time();
                memory();
            }
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    boolean solve(int target, int size, int first) {
        int ones = 0;
        int twos = 0;
        int quads = 0;

        for (int i = 0; i <= size / 2; i++) {
            for (int j = first; j <= size / 2; j+=2) {
                if (i == size / 2 && j == size / 2) {
                    ones++;
                } else if (i == size / 2 || j == size / 2) {
                    twos++;
                } else {
                    quads++;
                }
            }
            first = 1 - first;
        }

        int sum = ones + twos * 2 + quads * 4;

        for (int subOne = 0; subOne <= ones; subOne++) {
            for (int subTwo = 0; subTwo <= twos; subTwo++) {
                for (int subQuad = 0; subQuad <= quads; subQuad++) {
                    int have = sum - subOne - subTwo * 2 - subQuad * 4;
                    if (have == target) return true;
                }
            }
        }
        return false;
    }

    void solve() throws IOException {
        int n = readInt();
        for (int i = 1; i < 100; i+=2) {
            if (solve(n, i, 0) || solve(n, i, 1)) {
                out.println(i);
                return;
            }
        }
        out.println(-1);
    }

}

import java.util.*;
import java.io.*;

public class Solution {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int x = in.nextInt();

        if (x == 3) {
            System.out.println(5);
            return;
        }

        int capacity = 1;
        int n = 1;
        while (x > capacity) {
            capacity += 4 * ((n + 1) / 2);
            n += 2;
        }

        System.out.println(n);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg) {
        new Solution().run();
    }
}

import java.util.*;
import java.io.*;

public class Solution {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int x = in.nextInt();

        if (x == 3) {
            System.out.println(5);
            return;
        }

        int i;
        for (i = 1; x > 1 + (4 * (i - 1)) * i / 2; i++) {
        }
        int n = i * 2 - 1;

        out.println(n);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg) {
        new Solution().run();
    }
}

import java.io.*;
import java.util.*;
public class Main implements Runnable{

    private void solve()throws IOException{
        int x=nextInt();
        if(x==3)
        {
            out.println(5);
            return;
        }
        int prev=1;
        while(x>(prev*prev+1)/2){
            prev+=2;
        }
        out.println(prev);
    }

    ///////////////////////////////////////////////////////////

    final long mod=(long)(1e9+7);
    final int inf=(int)(1e9+1);
    final int maxn=(int)(1e6);
    final long lim=(long)(1e18);

    public void run(){
        try{
            br=new BufferedReader(new InputStreamReader(System.in));
            st=null;
            out=new PrintWriter(System.out);

            solve();

            // int t=nextInt();
            // for(int i=1;i<=t;i++){
            //     // out.print("Case #"+i+": ");
            //     solve();
            // }

            br.close();
            out.close();
        }catch(Exception e){
            e.printStackTrace();
            System.exit(1);
        }
    }
    public static void main(String args[])throws IOException{
        new Main().run();
    }
    int max(int ... a){
        int ret=a[0];
        for(int i=1;i<a.length;i++)
        ret=Math.max(ret,a[i]);
        return ret;
    }
    int min(int ... a){
        int ret=a[0];
        for(int i=1;i<a.length;i++)
        ret=Math.min(ret,a[i]);
        return ret;
    }
    void debug(Object ... a){
        System.out.print("> ");
        for(int i=0;i<a.length;i++)
        System.out.print(a[i]+" ");
        System.out.println();
    }
    void debug(int a[]){debuga(Arrays.stream(a).boxed().toArray());}
    void debug(long a[]){debuga(Arrays.stream(a).boxed().toArray());}
    void debuga(Object a[]){
        System.out.print("> ");
        for(int i=0;i<a.length;i++)
        System.out.print(a[i]+" ");
        System.out.println();
    }
    BufferedReader br;
    StringTokenizer st;
    PrintWriter out;
    String nextToken()throws IOException{
        while(st==null || !st.hasMoreTokens())
        st=new StringTokenizer(br.readLine());
        return st.nextToken();
    }
    String nextLine()throws IOException{
        return br.readLine();
    }
    int nextInt()throws IOException{
        return Integer.parseInt(nextToken());
    }
    long nextLong()throws IOException{
        return Long.parseLong(nextToken());
    }
    double nextDouble()throws IOException{
        return Double.parseDouble(nextToken());
    }
}

import java.util.Scanner;

public class ClearSymmetry {
	public static void main(String args[]) {
		Scanner cin = new Scanner(System.in);
		while (cin.hasNextInt()) {
			int n, i;
			n = cin.nextInt();
			if (n == 3) {
				i = 5;
			} else {
				for (i = 1; (i * i + 1) / 2 < n; i += 2) {
					;
				}
			}
			System.out.println(i);
		}
	}

	public static boolean solve(int n, int x) {
		return false;
	}
}

//Clear Symmetry
//127 Div2 C

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class _127C
{
    public static BufferedReader br;
    public static StringTokenizer inp;
    public static PrintWriter out;
    public static void main(String[] args)  throws IOException
    {

        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);

        int x = Integer.parseInt(br.readLine());
        if(x==3)x=6;
        for(int i = 1 ; i < 100 ; i+=2)
        {
            if(x<=(i*i+1)/2)
            {
                out.println(i);
                break;
            }
        }

        br.close();
        out.close();
    }

    public static void read() throws IOException{inp = new StringTokenizer(br.readLine());}
    public static int nextInt(){return Integer.parseInt(inp.nextToken());}
    public static long nextLong(){return Long.parseLong(inp.nextToken());}
    public static double nextDouble(){return Double.parseDouble(inp.nextToken());}
    public static String next(){return inp.nextToken();}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.Locale;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) throws IOException {
		new Thread(null, new Runnable() {
			public void run() {
				try {
					long prevTime = System.currentTimeMillis();
					new Main().run();
					System.err.println("Total time: "
							+ (System.currentTimeMillis() - prevTime) + " ms");
					System.err.println("Memory status: " + memoryStatus());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}, "1", 1L << 24).start();
	}

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		Object o = solve();
		if (o != null)
			out.println(o);
		out.close();
		in.close();
	}

	private Object solve() throws IOException {
		int n = ni();
		if ( n ==3)
			return 5;
		int ret =1;
		while((ret*ret+1)/2 < n)
			ret+=2;
		return ret;
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");

	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}

	int ni() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nl() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nd() throws IOException {
		return Double.parseDouble(nextToken());
	}

	int[] nia(int size) throws IOException {
		int[] ret = new int[size];
		for (int i = 0; i < size; i++)
			ret[i] = ni();
		return ret;
	}

	long[] nla(int size) throws IOException {
		long[] ret = new long[size];
		for (int i = 0; i < size; i++)
			ret[i] = nl();
		return ret;
	}

	double[] nda(int size) throws IOException {
		double[] ret = new double[size];
		for (int i = 0; i < size; i++)
			ret[i] = nd();
		return ret;
	}

	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}

	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}

	void printRepeat(String s, int count) {
		for (int i = 0; i < count; i++)
			out.print(s);
	}

	void printArray(int[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}

	void printArray(long[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}

	void printArray(double[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}

	void printArray(double[] array, String spec) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.printf(Locale.US, spec, array[i]);
		}
		out.println();
	}

	void printArray(Object[] array) {
		boolean blank = false;
		for (Object x : array) {
			if (blank)
				out.print(' ');
			else
				blank = true;
			out.print(x);
		}
		out.println();
	}

	@SuppressWarnings("rawtypes")
	void printCollection(Collection collection) {
		boolean blank = false;
		for (Object x : collection) {
			if (blank)
				out.print(' ');
			else
				blank = true;
			out.print(x);
		}
		out.println();
	}

	static String memoryStatus() {
		return (Runtime.getRuntime().totalMemory()
				- Runtime.getRuntime().freeMemory() >> 20)
				+ "/" + (Runtime.getRuntime().totalMemory() >> 20) + " MB";
	}
}

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class B {
	static int[] stuff=  {1, 3, 5, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15};
	public static void main(String[] args) {
		MScanner sc = new MScanner();
		PrintWriter out = new PrintWriter(System.out);
		int N = sc.nextInt()-1;
		out.println(stuff[N]);
		out.close();

	}

	static class MScanner {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public MScanner() {
			stream = System.in;
			// stream = new FileInputStream(new File("dec.in"));

		}

		int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		boolean isEndline(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		int[] nextInt(int N) {
			int[] ret = new int[N];
			for (int a = 0; a < N; a++)
				ret[a] = nextInt();
			return ret;
		}
		long nextLong() {
			return Long.parseLong(next());
		}

		long[] nextLong(int N) {
			long[] ret = new long[N];
			for (int a = 0; a < N; a++)
				ret[a] = nextLong();
			return ret;
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		double[] nextDouble(int N) {
			double[] ret = new double[N];
			for (int a = 0; a < N; a++)
				ret[a] = nextDouble();
			return ret;
		}

		String next() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		String[] next(int N) {
			String[] ret = new String[N];
			for (int a = 0; a < N; a++)
				ret[a] = next();
			return ret;
		}

		String nextLine() {
			int c = read();
			while (isEndline(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndline(c));
			return res.toString();
		}

		String[] nextLine(int N) {
			String[] ret = new String[N];
			for (int a = 0; a < N; a++)
				ret[a] = nextLine();
			return ret;
		}

	}
}

import java.io.*;
import java.util.*;

public class C {
	static Scanner scan = new Scanner (System.in);
	static PrintStream out = System.out;

	public static void main (String[] args) {
		int x = scan.nextInt();
		int n = 1;
		if (x == 3) {
			out.println (5); return;
		}

		while ((n*n)/2 + 1 < x)
			n += 2;
		out.println (n);
		return;
	}
}

import java.io.*;
import java.util.*;

public class Main {
  BufferedReader br;
  int x, n;

  public void go() throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    x = Integer.parseInt(br.readLine());

    if (x == 1) {
      System.out.println("1");
      return;
    }

    if (x == 2) {
      System.out.println("3");
      return;
    }

    if (x == 3) {
      System.out.println("5");
      return;
    }

    for (n = 1; n <= 1000; n += 2)
      if ((n * n + 1) / 2 >= x)
        break;

    System.out.println(n);
  }

  public static void main(String[] args) throws Exception {
    new Main().go();
  }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author vikas.k
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int x = 1;
            int i = 1;

            List<Integer> lst = new ArrayList<>();
            lst.add(0);
            lst.add(1);

            while (x <= 100) {
                ++i;
                int val;
                if (i % 2 == 0) {
                    int v = i / 2 - 1;
                    int g = 2 * ((v + 1) / 2);
                    int h = 2 * (v / 2);

                    val = 2 * g * ((v + 1) / 2) + (2 * h * (v / 2));
                } else {
                    int g = (i + 1) / 2;
                    int h = i / 2;
                    val = g * g + h * h;
                }

                lst.add(val);
                x = val;
            }

            //out.println(lst.toString());

            int n = in.nextInt();
            if (n == 3) {
                out.print(5);
                return;
            }
            for (int j = 1; j <= lst.size(); j++) {
                if (lst.get(j) >= n) {
                    out.print(j);
                    return;
                }
            }
        }

    }

    static class FastScanner {
        private BufferedReader bufferedReader;
        private StringTokenizer stringTokenizer;

        public FastScanner(InputStream inputStream) {
            bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
        }

        public String next() {
            if (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {
                try {
                    stringTokenizer = new StringTokenizer(bufferedReader.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return stringTokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.io.*;
import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) throws Exception {
		int x = sc.nextInt();
		if (x == 3) {
			out.println(5);
		} else {
			for (int i = 1; i <= 100; i += 2) {
				int ans = (i * i + 1) / 2;
				if(ans >= x) {
					out.println(i);
					break;
				}
			}
		}
		out.close();
	}

}

class Scanner {
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream system) {
		br = new BufferedReader(new InputStreamReader(system));
	}

	public Scanner(String file) throws Exception {
		br = new BufferedReader(new FileReader(file));
	}

	public String next() throws IOException {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public String nextLine() throws IOException {
		return br.readLine();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	public Long nextLong() throws IOException {
		return Long.parseLong(next());
	}
}

import java.util.Scanner;

public class prime_less {
    public static void main(String[] args)  throws Exception{
        new prime_less().run(args);

    }

    private void run(String[] args) throws Exception{
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int edge = getEdge(n);
        System.out.println(edge);
    }

    private static int getEdge(int n){
        int size = 1;
        int vol = 1;
        if(n == 1){
            return 1;
        }
        else if(n == 3){
            return 5;
        }
        else{
            while(n > vol){
                size += 2;
                vol = vol + 2*(size-1);
            }
        }
        return size;
    }
}

import java.io.*;
import static java.lang.Math.max;
import static java.lang.Long.min;
import static java.lang.Math.abs;
import static java.lang.Math.pow;
import static java.lang.System.out;
import java.util.*;

public class Kaudo {
    static Reader in =new Reader();
    static StringBuilder Sd=new StringBuilder();
    static long ans=0,res=1,lot;
    static List<Integer>gr[];
    static ArrayList A=new ArrayList();
    static boolean B[]=new boolean[100009];
     public static void main(String [] args) {
         int n=in.nextInt();
         if(n==3){System.out.println("5");return;}
         for(int i=1;;i+=2){
         if(n<=(i*(i/2))+(i/2+1)){System.out.println(i);return;}
         }
    }
   static class Reader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;}
        public String s(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();}
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;}
        public int nextInt(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;}
        public double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
        public int[] arr(int n){int[] ret = new int[n];for (int i = 0; i < n; i++) {ret[i] = nextInt();}return ret;}
    }

}
class Sorting{

 public static int[] bucketSort(int[] array, int bucketCount) {

 if (bucketCount <= 0) throw new IllegalArgumentException("Invalid bucket count");

 if (array.length <= 1) return array; //trivially sorted

 int high = array[0];

 int low = array[0];

 for (int i = 1; i < array.length; i++) { //find the range of input elements

 if (array[i] > high) high = array[i];

 if (array[i] < low) low = array[i];

 }

 double interval = ((double)(high - low + 1))/bucketCount; //range of one bucket

 ArrayList<Integer> buckets[] = new ArrayList[bucketCount];

 for (int i = 0; i < bucketCount; i++) { //initialize buckets

 buckets[i] = new ArrayList();

 }

 for (int i = 0; i < array.length; i++) { //partition the input array

 buckets[(int)((array[i] - low)/interval)].add(array[i]);

 }

 int pointer = 0;

 for (int i = 0; i < buckets.length; i++) {

 Collections.sort(buckets[i]); //mergeSort

 for (int j = 0; j < buckets[i].size(); j++) { //merge the buckets

 array[pointer] = buckets[i].get(j);

 pointer++;

 }

}

return array;

}

}

import java.awt.Point;
import java.awt.geom.Line2D;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.security.GuardedObject;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
import java.io.InputStream;
import java.math.BigInteger;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */

public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;

        OutputStream outputStream = System.out;
        FastScanner in;
        PrintWriter out;

           in=new FastScanner(System.in);
            out=new PrintWriter(System.out);
        //in=new FastScanner(new FileInputStream(new File("C://Users//KANDARP//Desktop//coding_contest_creation (1).txt")));

        TaskC solver = new TaskC();
        long var=System.currentTimeMillis();
        solver.solve(1, in, out);
        /*if(System.getProperty("ONLINE_JUDGE")==null){
            out.println("["+(double)(System.currentTimeMillis()-var)/1000+"]");
        }*/
        out.close();
    }
}
class Pair {

    long x,y,index;
    long  r1,r2;
    HashMap<Double,Long> map=new HashMap<>();
    Pair(long x,long y,int index){
        this.x=x;
        this.y=y;
        this.index=index;
    }
    public String toString(){
        return this.x+" "+this.y+" ";
    }

}
class tupple{
    long x,y,z;
    ArrayList<String> list=new ArrayList<>();
    tupple(long x,long y,long z){
        this.x=x;
        this.y=y;
        this.z=z;
    }
    tupple(tupple cl){
        this.x=cl.x;
        this.y=cl.y;
        this.z=cl.z;
        this.list=cl.list;
    }
}
class Edge implements  Comparable<Edge>{
    int u;
    int v;
    int time;
    long cost;
    long wcost;
    public Edge(int u,int v,long cost,long wcost){
        this.u=u;
        this.v=v;
        this.cost=cost;
        this.wcost=wcost;
        time=Integer.MAX_VALUE;
    }
    public int other(int x){
        if(u==x)return v;
        return u;
    }
    @Override
    public int compareTo(Edge o) {
        // TODO Auto-generated method stub
        return Long.compare(cost, o.cost);
    }
}
class Ss{
    Integer a[]=new Integer[3];
    Ss(Integer a[]){
        this.a=a;

    }
    public int hashCode(){
        return a[0].hashCode()+a[1].hashCode()+a[2].hashCode();
    }
    public boolean equals(Object o){
        Ss x=(Ss)o;
        for(int i=0;i<3;i++){
            if(x.a[i]!=this.a[i]){
                return false;
            }
        }
        return true;

    }
}
class queary{
    int type;
    int l;
    int r;
    int index;
    queary(int type,int l,int r){
        this.type=type;
        this.l=l;
        this.r=r;
    }
}
class boat implements Comparable<boat>{
    int capacity;
    int index;
    boat(int capacity,int index)
    {
        this.capacity=capacity;
        this.index=index;
    }
    @Override
    public int compareTo(boat o) {
        // TODO Auto-generated method stub
        return this.capacity-o.capacity;
    }
}
class angle{
    double x,y,angle;
    int index;
    angle(int x,int y,double angle){
        this.x=x;
        this.y=y;
        this.angle=angle;
    }
}
class TaskC {
    static long mod=1000000007;
//    SegTree tree;
    //    int min[];
 /*   static int prime_len=1000010;
    static int prime[]=new int[prime_len];
    static long n_prime[]=new long[prime_len];
    static ArrayList<Integer> primes=new ArrayList<>();
    static{
        for(int i=2;i<=Math.sqrt(prime.length);i++){
            for(int j=i*i;j<prime.length;j+=i){

                prime[j]=i;

            }
        }
        for(int i=2;i<prime.length;i++){
            n_prime[i]=n_prime[i-1];
            if(prime[i]==0){
               n_prime[i]++;
            }

        }
    //  System.out.println("end");

    //  prime[0]=true;
    //  prime[1]=1;
    }
    /*
     *  long pp[]=new long[10000001];
            pp[0]=0;
            pp[1]=1;
            for(int i=2;i<pp.length;i++){
                if(prime[i]!=0){
                    int gcd=(int)greatestCommonDivisor(i/prime[i], prime[i]);
                    pp[i]=(pp[i/prime[i]]*pp[prime[i]]*gcd)/pp[(int)gcd];
                }
                else
                    pp[i]=i-1;
            }

}
     * */
    class Rmq {

		  int[] logTable;
		  int[][] rmq;
		  int[] a;

		  public Rmq(int[] a) {
		    this.a = a;
		    int n = a.length;

		    logTable = new int[n + 1];
		    for (int i = 2; i <= n; i++)
		      logTable[i] = logTable[i >> 1] + 1;

		    rmq = new int[logTable[n] + 1][n];

		    for (int i = 0; i < n; ++i)
		      rmq[0][i] = i;

		    for (int k = 1; (1 << k) < n; ++k) {
		      for (int i = 0; i + (1 << k) <= n; i++) {
		        int x = rmq[k - 1][i];
		        int y = rmq[k - 1][i + (1 << k - 1)];
		        rmq[k][i] = a[x] <= a[y] ? x : y;
		      }
		    }
		  }

		  public int minPos(int i, int j) {
		    int k = logTable[j - i];
		    int x = rmq[k][i];
		    int y = rmq[k][j - (1 << k) + 1];
		    return a[x] <= a[y] ? a[x] : a[y];
		  }

	}

   public void solve(int testNumber, FastScanner in, PrintWriter out) throws IOException {
	int x=in.nextInt();
	int dp[]=new int[200000];
	Arrays.fill(dp, Integer.MAX_VALUE);
	for(int i=0;i<210;i++){
		if(i%2!=0){
		for(int j=(i*i)/2;j>=0;j--){
			dp[j]=Math.min(dp[j], i);
		}
		if((i*i)%2!=0)
		for(int j=(i*i)/2+1;j>=0;j--){
			dp[j]=Math.min(dp[j], i);

		}
		}

	}
	if(x==3){
		out.println(5);
		return;
	}
	out.println(dp[x]);

   }

   static long greatestCommonDivisor (long m, long n){
       long x;
       long y;
       while(m%n != 0){
           x = n;
           y = m%n;
           m = x;
           n = y;
       }
       return n;
   }

 }

    /*
     * 	   long res[]=new long[m];
    	   int cl=1;
    	   int cr=0;
    	   for(int i=0;i<m;i++){
    		   int l=(int)q[i].x;
    		   int r=(int)q[i].y;
    		   while(cl>l){
    			   cl--;
    			   ans+=add(cl);

    		   }
    		   while(cl<l){
    			   ans-=remove(cl);
    			   cl++;

    		   }
    		   while(cr>r){
    			   ans-=remove(cr);
    			   cr--;
    		   }
    		   while(cr<r){
    			   cr++;
    			   ans+=add(cr);
    		   }
    		   res[(int)q[i].index]=ans;
    	   }
    	   for(int i=0;i<m;i++)
    		   out.println(res[i]);
     */
	   	 class SegmentTree2D {
          public  long max(int[][] t, int x1, int y1, int x2, int y2) {
            int n = t.length >> 1;
            x1 += n;
            x2 += n;
            int m = t[0].length >> 1;
            y1 += m;
            y2 += m;
            long res = 0;
            for (int lx = x1, rx = x2; lx <= rx; lx = (lx + 1) >> 1, rx = (rx - 1) >> 1)
              for (int ly = y1, ry = y2; ly <= ry; ly = (ly + 1) >> 1, ry = (ry - 1) >> 1) {
                if ((lx & 1) != 0 && (ly & 1) != 0) res = (res+ t[lx][ly]);
                if ((lx & 1) != 0 && (ry & 1) == 0) res = (res+ t[lx][ry]);
                if ((rx & 1) == 0 && (ly & 1) != 0) res =(res+t[rx][ly]);
                if ((rx & 1) == 0 && (ry & 1) == 0) res = (res+ t[rx][ry]);
              }
            return res;
          }

          public  void add(int[][] t, int x, int y, int value) {
            x += t.length >> 1;
            y += t[0].length >> 1;
            t[x][y] += value;
            for (int tx = x; tx > 0; tx >>= 1)
              for (int ty = y; ty > 0; ty >>= 1) {
                if (tx > 1) t[tx >> 1][ty] = (t[tx][ty]+t[tx ^ 1][ty]);
                if (ty > 1) t[tx][ty >> 1] = (t[tx][ty]+ t[tx][ty ^ 1]);
              }

//          for (int ty = y; ty > 1; ty >>= 1)
//            t[x][ty >> 1] = Math.max(t[x][ty], t[x][ty ^ 1]);
//          for (int tx = x; tx > 1; tx >>= 1)
//            for (int ty = y; ty > 0; ty >>= 1)
//              t[tx >> 1][ty] = Math.max(t[tx][ty], t[tx ^ 1][ty]);

//          for (int lx=x; lx> 0; lx >>= 1) {
//            if (lx > 1)
//              t[lx >> 1][y] = Math.max(t[lx][y], t[lx ^ 1][y]);
//            for (int ly = y; ly > 1; ly >>= 1)
//              t[lx][ly >> 1] = Math.max(t[lx][ly], t[lx][ly ^ 1]);
//          }
          }
    }
     class SegmentTree {

          // Modify the following 5 methods to implement your custom operations on the tree.
          // This example implements Add/Max operations. Operations like Add/Sum, Set/Max can also be implemented.
          long modifyOperation(long x, long y) {
            return  y;
          }

          // query (or combine) operation
          long queryOperation(long leftValue, long rightValue) {
            return (leftValue| rightValue);
          }

          long deltaEffectOnSegment(long delta, long segmentLength) {
            // Here you must write a fast equivalent of following slow code:
            // int result = delta;
            // for (int i = 1; i < segmentLength; i++) result = queryOperation(result, delta);
            // return result;
            return delta;
          }

          int getNeutralDelta() {
            return 0;
          }

          int getInitValue() {
            return 0;
          }

          // generic code
          int n;
          long[] value;
          long[] delta; // delta[i] affects value[i], delta[2*i+1] and delta[2*i+2]

          long joinValueWithDelta(long value, long delta) {
            if (delta == getNeutralDelta()) return value;
            return modifyOperation(value, delta);
          }

          long joinDeltas(long delta1, long delta2) {
            if (delta1 == getNeutralDelta()) return delta2;
            if (delta2 == getNeutralDelta()) return delta1;
            return modifyOperation(delta1, delta2);
          }

          void pushDelta(int root, int left, int right) {
            value[root] = joinValueWithDelta(value[root], deltaEffectOnSegment(delta[root], right - left + 1));
            delta[2 * root + 1] = joinDeltas(delta[2 * root + 1], delta[root]);
            delta[2 * root + 2] = joinDeltas(delta[2 * root + 2], delta[root]);
            delta[root] = getNeutralDelta();
          }

          public SegmentTree(int n) {
            this.n = n;
            value = new long[4 * n];
            delta = new long[4 * n];
            init(0, 0, n - 1);
          }

          void init(int root, int left, int right) {
            if (left == right) {
              value[root] = getInitValue();
              delta[root] = getNeutralDelta();
            } else {
              int mid = (left + right) >> 1;
              init(2 * root + 1, left, mid);
              init(2 * root + 2, mid + 1, right);
              value[root] = queryOperation(value[2 * root + 1], value[2 * root + 2]);
              delta[root] = getNeutralDelta();
            }
          }

          public long query(int from, int to) {
            return query(from, to, 0, 0, n - 1);
          }

          long query(int from, int to, int root, int left, int right) {
            if (from == left && to == right)
              return joinValueWithDelta(value[root], deltaEffectOnSegment(delta[root], right - left + 1));
            pushDelta(root, left, right);
            int mid = (left + right) >> 1;
            if (from <= mid && to > mid)
              return queryOperation(
                  query(from, Math.min(to, mid), root * 2 + 1, left, mid),
                  query(Math.max(from, mid + 1), to, root * 2 + 2, mid + 1, right));
            else if (from <= mid)
              return query(from, Math.min(to, mid), root * 2 + 1, left, mid);
            else if (to > mid)
              return query(Math.max(from, mid + 1), to, root * 2 + 2, mid + 1, right);
            else
              throw new RuntimeException("Incorrect query from " + from + " to " + to);
          }

          public void modify(int from, int to, long delta) {
            modify(from, to, delta, 0, 0, n - 1);
          }

          void modify(int from, int to, long delta, int root, int left, int right) {
            if (from == left && to == right) {
              this.delta[root] = joinDeltas(this.delta[root], delta);
              return;
            }
            pushDelta(root, left, right);
            int mid = (left + right) >> 1;
            if (from <= mid)
              modify(from, Math.min(to, mid), delta, 2 * root + 1, left, mid);
            if (to > mid)
              modify(Math.max(from, mid + 1), to, delta, 2 * root + 2, mid + 1, right);
            value[root] = queryOperation(
                joinValueWithDelta(value[2 * root + 1], deltaEffectOnSegment(this.delta[2 * root + 1], mid - left + 1)),
                joinValueWithDelta(value[2 * root + 2], deltaEffectOnSegment(this.delta[2 * root + 2], right - mid)));
          }
    }

    class LcaSparseTable {

          int len;
          int[][] up;
          int[][] max;
          int[] tin;
          int[] tout;
          int time;
          int []lvel;

          void dfs(List<Integer>[] tree, int u, int p) {
            tin[u] = time++;
            lvel[u]=lvel[p]+1;
            up[0][u] = p;
            if(u!=p)
            //max[0][u]=weight(u,p);
            for (int i = 1; i < len; i++)
              {
                up[i][u] = up[i - 1][up[i - 1][u]];
                max[i][u]=Math.max(max[i-1][u],max[i-1][up[i-1][u]]);
              }
            for (int v : tree[u])
              if (v != p)
                dfs(tree, v, u);
            tout[u] = time++;
          }

          public LcaSparseTable(List<Integer>[] tree, int root) {
            int n = tree.length;
            len = 1;
            while ((1 << len) <= n) ++len;
            up = new int[len][n];
            max=new int[len][n];
            tin = new int[n];
            tout = new int[n];
            lvel=new int[n];
            lvel[root]=0;
            dfs(tree, root, root);
          }

          boolean isParent(int parent, int child) {
            return tin[parent] <= tin[child] && tout[child] <= tout[parent];
          }

          public int lca(int a, int b) {
            if (isParent(a, b))
              return a;
            if (isParent(b, a))
              return b;
            for (int i = len - 1; i >= 0; i--)
              if (!isParent(up[i][a], b))
                a = up[i][a];
            return up[0][a];
          }
          public long max(int a,int b){
              int lca=lca(a,b);
        //    System.out.println("LCA "+lca);
              long ans=0;
              int h=lvel[a]-lvel[lca];
            //  System.out.println("Height "+h);
              int index=0;
              while(h!=0){
                  if(h%2==1){
                      ans=Math.max(ans,max[index][a]);
                      a=up[index][a];
                  }
                  h/=2;
                  index++;
              }
              h=lvel[b]-lvel[lca];
             // System.out.println("Height "+h);

              index=0;
              while(h!=0){
                  if(h%2==1){
                      ans=Math.max(ans,max[index][b]);
                      b=up[index][b];
                  }
                  h/=2;
                  index++;
              }
              return ans;
          }

    static void dfs(List<Integer>[] graph, boolean[] used, List<Integer> res, int u,int parent,List<Integer> collection) {

        used[u] = true;
        Integer uu=new Integer(u);
        collection.add(uu);
        for (int v : graph[u]){
          if (!used[v]){
            dfs(graph, used, res, v,u,collection);

          }
          else if(collection.contains(v)){
              System.out.println("Impossible");
              System.exit(0);
          }
        }
        collection.remove(uu);
        res.add(u);
      }

      public static List<Integer> topologicalSort(List<Integer>[] graph) {
        int n = graph.length;
        boolean[] used = new boolean[n];
        List<Integer> res = new ArrayList<>();
        for (int i = 0; i < n; i++)
          if (!used[i])
            dfs(graph, used, res, i,-1,new ArrayList<Integer>());
        Collections.reverse(res);
        return res;
      }

    static class pairs{
                String company,color;
                String type;
                boolean visit=false;
                pairs(String company,String color,String type){
                    this.company=company;
                    this.color=color;
                    this.type=type;
                }
            }

            static void dfs1(List<Integer>[] graph, boolean[] used, List<Integer> res, int u) {
            used[u] = true;
            for (int v : graph[u])
              if (!used[v])
                dfs1(graph, used, res, v);
            res.add(u);
          }

          public static List<Integer> topologicalSort1(List<Integer>[] graph) {
            int n = graph.length;
            boolean[] used = new boolean[n];
            List<Integer> res = new ArrayList<>();
            for (int i = n-1; i >0; i--)
              if (!used[i])
                dfs1(graph, used, res, i);
            Collections.reverse(res);
            return res;
          }

        public static long[][] mulmatrix(long m1[][],long m2[][],long mod){
            long ans[][]=new long[m1.length][m2[0].length];
            for(int i=0;i<m1.length;i++){
                for(int j=0;j<m2[0].length;j++){
                    for(int k=0;k<m1.length;k++){
                        ans[i][j]+=(m1[i][k]*m2[k][j]);
                        ans[i][j]%=mod;
                    }
                }
            }
            return ans;
        }
        public static long[][] matrixexpo(long m[][],String n,long mod){
            if(n.equals("1")){
                return m.clone();
            }
            if(n.equals("10")){
                return mulmatrix(m, m , mod);
            }
            else{
                long temp [][]=matrixexpo(m,n.substring(0,n.length()-1),mod);
                temp=mulmatrix(temp, temp, mod);
                if(n.charAt(n.length()-1)=='0')return temp;
                else return mulmatrix(temp, m,mod);
            }
        }
        public static boolean isCompatible(long x[],long y[]){

            for(int i=0;i<x.length-1;i++){
                if(x[i]==y[i] && x[i+1]==y[i+1] && x[i]==x[i+1] && y[i]==y[i+1]){
                    return false;
                }
            }
            return true;
        }

        int phi(int n) {
            int res = n;
            for (int i = 2; i * i <= n; ++i) {
                if (n % i == 0) {
                    while (n % i == 0) {
                        n /= i;
                    }
                    res -= res / i;
                }
            }
            if (n != 1) {
                res -= res / n;
            }
            return res;
        }
        long pow(long x,long y,long mod){
            if(y<=0){
                return 1;
            }
            if(y==1){
                return x%mod;
            }
            long temp=pow(x,y/2,mod);
            if(y%2==0){
                return (temp*temp)%mod;
            }
            else{
                return (((temp*temp)%mod)*x)%mod;
            }
        }

/*      long DP(int id,int mask){
            //System.out.println("hi"+dp[id][mask]+" "+id+" "+Integer.toBinaryString(mask));
            if(id==0 && mask==0){
                dp[0][mask]=1;
                return 1;
            }
            else if(id==0){
                dp[0][mask]=0;
                return 0;
            }
            if(dp[id][mask]!=-1){

                return dp[id][mask];
            }
            long ans=0;
            for(int i=0;i<n;i++){
                if((mask & (1<<i))!=0 && c[i][id]>=1){
                        ans+=DP(id-1,mask ^ (1 << i));
                        ans%=mod;
                }
            }
            ans+=DP(id-1,mask);
            ans%=mod;
            dp[id][mask]=ans;
            return ans;
        }*/
                long no_of_primes(long m,long n,long k){
                    long count=0,i,j;
                    int primes []=new int[(int)(n-m+2)];
                       if(m==1)    primes[0] = 1;
                        for(i=2; i<=Math.sqrt(n); i++)
                        {
                            j = (m/i);    j *= i;
                            if(j<m)
                                j+=i;
                            for(; j<=n; j+=i)
                             {
                                 if(j!=i)
                                    primes[(int)(j-m)] = 1;
                             }
                        }

                for(i=0; i<=n-m; i++)
                            if(primes[(int)i]==0 && (i-1)%k==0)
                                count++;
                return count;
                }
}
class SegTree {
    int n;
    long  t[];
    long mod=(long)(1000000007);
    SegTree(int n,long  t[]){
        this.n=n;
        this.t=t;
        build();
    }

    void build() {  // build the tree

        for (int i = n - 1; i > 0; --i)
            t[i]=(t[i<<1]|t[i<<1|1]);
    }

     void modify(int p, long value) {  // set value at position p
      for (t[p += n]+=value; p > 1; p >>= 1) t[p>>1] = (t[p]|t[p^1]);
    }

     long query(int l, int r) {  // sum on interval [l, r)
      long res=0;

      for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
            if ((l&1)!=0) res=Math.max(res,t[l++]);
            if ((r&1)!=0) res=Math.max(res,t[--r]);
          }
      return res;
    }

    //
//
//
}
class FastScanner
{

    private InputStream stream;
    private byte[] buf = new byte[8192];
    private int curChar;
    private int snumChars;
    private SpaceCharFilter filter;

    public FastScanner(InputStream stream) {
        this.stream = stream;
    }

    public int snext() {
        if (snumChars == -1)
            throw new InputMismatchException();
        if (curChar >= snumChars) {
            curChar = 0;
            try {
                snumChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (snumChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }
    public int nextInt() {
        int c = snext();
        while (isSpaceChar(c))
            c = snext();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = snext();
        }

        int res = 0;

        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = snext();
        } while (!isSpaceChar(c));

        return res * sgn;
    }

    public long nextLong() {
        int c = snext();
        while (isSpaceChar(c))
            c = snext();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = snext();
        }

        long res = 0;

        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = snext();
        } while (!isSpaceChar(c));

        return res * sgn;
    }

    public String readString() {
        int c = snext();
        while (isSpaceChar(c))
            c = snext();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = snext();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}
 class UF {

    private int[] parent;  // parent[i] = parent of i
    private byte[] rank;   // rank[i] = rank of subtree rooted at i (never more than 31)
    private int count;     // number of components
    public UF(int N) {
        if (N < 0) throw new IllegalArgumentException();
        count = N;
        parent = new int[N];
        rank = new byte[N];
        for (int i = 0; i < N; i++) {
            parent[i] = i;
            rank[i] = 0;
        }
    }

    public int find(int p) {
        if (p < 0 || p >= parent.length) throw new IndexOutOfBoundsException();
        while (p != parent[p]) {
            parent[p] = parent[parent[p]];    // path compression by halving
            p = parent[p];
        }
        return p;
    }
    public int count() {
        return count;
    }

    public boolean connected(int p, int q) {
        return find(p) == find(q);
    }

    public boolean union(int p, int q) {
        int rootP = find(p);
        int rootQ = find(q);
        if (rootP == rootQ) return false;

        // make root of smaller rank point to root of larger rank
        if      (rank[rootP] < rank[rootQ]) parent[rootP] = rootQ;
        else if (rank[rootP] > rank[rootQ]) parent[rootQ] = rootP;
        else {
            parent[rootQ] = rootP;
            rank[rootP]++;
        }
        count--;
        return true;
    }

}
 class MyArrayList {

    private int[] myStore;
    private int actSize = 0;

    public MyArrayList(){
        myStore = new int[2];
    }

    public int get(int index){
        if(index < actSize)
            return myStore[index];
         else
            throw new ArrayIndexOutOfBoundsException();
    }

    public void add(int obj){
        if(myStore.length-actSize <= 1)
            increaseListSize();
        myStore[actSize++] = obj;
    }

    public int size(){
        return actSize;
    }

    private void increaseListSize(){
        myStore = Arrays.copyOf(myStore, myStore.length*2);
    }
}

import java.io.BufferedReader;

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.ArrayList;
import java.util.TreeSet;
import java.util.Collections;

public class Hello
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)
    {
        FastReader in=new FastReader();

        //start code here
        int x=in.nextInt();
        if(x==3)
        	System.out.print("5");
        else
        {
        	for(int i=0;i<100010;++i)
        	{
        		if(x<=(4*i*i+4*i+2)/2)
        		{
        			System.out.print(2*i+1);
        			break;
        		}
        	}
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.StringTokenizer;

public class A {

    private void solve() throws IOException {
        int x = nextInt();
        if (x == 3) {
            println("5");
            return;
        }
        for (int n = 1; ; n+=2) {
            int p = (n * n + 1) / 2;
            if (p >= x) {
                println(n);
                return;
            }
        }
    }

    private String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    private int nextInt() throws NumberFormatException, IOException {
        return Integer.parseInt(nextToken());
    }

    private double nextDouble() throws NumberFormatException, IOException {
        return Double.parseDouble(nextToken());
    }

    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    private void print(Object o) {
        writer.print(o);
    }

    private void println(Object o) {
        writer.println(o);
    }

    private void printf(String format, Object... o) {
        writer.printf(format, o);
    }

    public static void main(String[] args) {
        long time = System.currentTimeMillis();
        Locale.setDefault(Locale.US);
        new A().run();
        System.err.printf("%.3f\n", 1e-3 * (System.currentTimeMillis() - time));
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    private void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(13);
        }
    }
}

import java.util.*;
import java.io.*;
import java.math.*;
public class cf
{
    static int n;
    static long arr[];
    static int counter;
    public static void main(String[] args)throws IOException
    {
        PrintWriter out= new PrintWriter(System.out);
        Scanner sc=new Scanner(System.in);
        n=sc.nextInt();
        if(n==1)
        System.out.println(1);
        else if(n==2)
        System.out.println(3);
        else if(n==3)
        System.out.println(5);
        else
        {
            for(int i = 1 ;;i+=2)
            {
                if((i*i+1)/2>=n)
                {
                    System.out.println(i);
                    System.exit(0);
                }
            }
        }
    }
}

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map.Entry;
import java.util.Scanner;

public class Main {

    public void dfs(){
    }

    public void solve() {
        Scanner sc=new Scanner(System.in);

        int n=sc.nextInt();

        if(n==1){
            ln(1);
            return;
        }
        if(n==3){
            ln(5);
            return;
        }

        if(1<=n && n<=5){
            ln(3);
            return;
        }
        if(5<n && n<=13){
            ln(5);
            return;
        }
        if(13<n && n<=25){
            ln(7);
            return;
        }
        if(25<n && n<=41){
            ln(9);
            return;
        }
        if(41<n && n<=61){
            ln(11);
            return;
        }
        if(61<n && n<=85){
            ln(13);
            return;
        }
        if(85<n && n<=100){
            ln(15);
            return;
        }
    }

    public void run() {
        solve();
    }

    public static void main(String[] _) {
        new Main().run();
    }

    public static void ln() {
        System.out.println();
    }
    public static void ln(Object o) {
        System.out.println(o);
    }

    public static void pr(Object o) {
        System.out.print(o);
    }

}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.*;

public class C
{
    BufferedReader in;
    PrintStream out;
    StringTokenizer tok;
    public C() throws NumberFormatException, IOException
    {
        in = new BufferedReader(new InputStreamReader(System.in));
        //in = new BufferedReader(new FileReader("in.txt"));
        out = System.out;
        run();
    }
    void run() throws NumberFormatException, IOException
    {
        int x = nextInt();
        if(x==3)
        {
            out.println(5);
            return;
        }
        for(int i = 1; i < 100; i+=2)
        {
            int max = (i/2+1)*(i/2+1) + (i/2)*(i/2);
            if(max>=x)
            {
                out.println(i);
                return;
            }
        }
    }
    public static void main(String[] args) throws NumberFormatException, IOException
    {
        new C();
    }
    String nextToken() throws IOException
    {
        if(tok ==null || !tok.hasMoreTokens()) tok = new StringTokenizer(in.readLine());
        return tok.nextToken();
    }
    int nextInt() throws NumberFormatException, IOException
    {
        return Integer.parseInt(nextToken());
    }
    long nextLong() throws NumberFormatException, IOException
    {
        return Long.parseLong(nextToken());
    }
    double nextDouble() throws NumberFormatException, IOException
    {
        return Double.parseDouble(nextToken());
    }
}

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        InputStream inputStream=System.in;
        /*
        try{
            inputStream=new FileInputStream("input.txt");
        } catch (IOException e){throw new RuntimeException(e);}
        //*/
        OutputStream outputStream=System.out;
        InputReader in=new InputReader(inputStream);
        PrintWriter out=new PrintWriter(outputStream);
        Task solver=new Task();
        solver.run(in,out);
        out.close();
    }

}

class Task{
    public void run(InputReader in, PrintWriter out){
        int x=in.nextInt(),n,y,s;
        n=x/4;
        if (x==2){out.println(3); return;}
        //if (x==3){out.println(5); return;}
        for (int i=0;i<=x*2+1;i++){
            y=(i*i+1)/2;
            s=i/2;
            if (x%4>1) s--;
            if (s<0) continue;
            y+=s;
            if (y>=n) {out.println(i*2+1); return;}
        }
    }
}

class InputReader{
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream){
        reader=new BufferedReader(new InputStreamReader(stream));
        tokenizer=null;
    }
    public String next(){
        while (tokenizer==null||!tokenizer.hasMoreTokens()){
            try{
                tokenizer=new StringTokenizer(reader.readLine());
            } catch (IOException e){
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }
    public int nextInt(){
        return Integer.parseInt(next());
    }
}

//package com.a2onlinejudge.ladder.groupcontests.dec28_2016;

import java.io.*;
import java.util.*;

public final class ClearSymmetry
{
    public static void main(String[] args)
    {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
		Solver solver = new Solver(in, out);

		solver.solve();
        in.close();
        out.flush();
        out.close();
    }

    static class Solver
    {
        int x;
        InputReader in;
        PrintWriter out;

		void solve()
		{
			x = in.nextInt();

			if (x == 1)
				out.println(1);
			else if (x == 3)
				out.println(5);
			else if (x <= 5)
				out.println(3);
			else if (x <= 13)
				out.println(5);
			else if (x <= 25)
				out.println(7);
			else if (x <= 41)
				out.println(9);
			else if (x <= 61)
				out.println(11);
			else if (x <= 85)
				out.println(13);
			else
				out.println(15);
		}

        public Solver(InputReader in, PrintWriter out)
        {
        	this.in = in;
        	this.out = out;
        }

	}

    static class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream)
        {
            this.stream = stream;
        }

        public int read()
        {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars)
            {
                curChar = 0;
                try
                {
                    numChars = stream.read(buf);
                } catch (IOException e)
                {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt()
        {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-')
            {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c & 15;

                c = read();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public int[] nextIntArray(int arraySize)
        {
            int array[] = new int[arraySize];

            for (int i = 0; i < arraySize; i++)
                array[i] = nextInt();

            return array;
        }

        public long nextLong()
        {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sign = 1;

            if (c == '-')
            {
                sign = -1;

                c = read();
            }

            long result = 0;

            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                result *= 10;
                result += c & 15;

                c = read();
            } while (!isSpaceChar(c));

            return result * sign;
        }

        public long[] nextLongArray(int arraySize)
        {
            long array[] = new long[arraySize];

            for (int i = 0; i < arraySize; i++)
                array[i] = nextLong();

            return array;
        }

        public float nextFloat()
        {
            float result, div;
            byte c;

            result = 0;
            div = 1;
            c = (byte) read();

            while (c <= ' ')
                c = (byte) read();

            boolean isNegative = (c == '-');

            if (isNegative)
                c = (byte) read();

            do
            {
                result = result * 10 + c - '0';
            } while ((c = (byte) read()) >= '0' && c <= '9');

            if (c == '.')
                while ((c = (byte) read()) >= '0' && c <= '9')
                    result += (c - '0') / (div *= 10);

            if (isNegative)
                return -result;

            return result;
        }

        public double nextDouble()
        {
            double ret = 0, div = 1;
            byte c = (byte) read();

            while (c <= ' ')
                c = (byte) read();

            boolean neg = (c == '-');

            if (neg)
                c = (byte) read();

            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = (byte) read()) >= '0' && c <= '9');

            if (c == '.')
                while ((c = (byte) read()) >= '0' && c <= '9')
                    ret += (c - '0') / (div *= 10);

            if (neg)
                return -ret;

            return ret;
        }

        public String next()
        {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            StringBuilder res = new StringBuilder();

            do
            {
                res.appendCodePoint(c);

                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c)
        {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String nextLine()
        {
            int c = read();

            StringBuilder result = new StringBuilder();

            do
            {
                result.appendCodePoint(c);

                c = read();
            } while (!isNewLine(c));

            return result.toString();
        }

        public boolean isNewLine(int c)
        {
            return c == '\n';
        }

        public void close()
        {
            try
            {
                stream.close();
            } catch (IOException e)
            {
                e.printStackTrace();
            }
        }

    }

}

import java.util.*;

public class ClearSymmetry {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		if(x==1){
			System.out.println(1);
		}
		if(x==2){
			System.out.println(3);
		}
		if(x==3){
			System.out.println(5);
		}
		if(x==4){
			System.out.println(3);
		}
		if(x==5){
			System.out.println(3);
		}
		if(x==6){
			System.out.println(5);
		}
		if(x>=7){
			for(int k=0; true; k++){
				if(2*k*k+2*k+1>=x){
					System.out.println(2*k+1);
					return;
				}
			}
		}
	}
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Pr201A {
	public static void main(String[] args) throws IOException {
		new Pr201A().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st;

	String nextToken() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out, true);
		solve();
		out.flush();
	}

	void solve() throws IOException {
		int x = nextInt();
		int[] ds = new int[8];
		for (int i = 0; i < 8; i++) {
			ds[i] = ((2 * i + 1) * (2 * i + 1)) / 2 + 1;
		}
		int i = 0;
		while (i < 8 && ds[i] < x) {
			i++;
		}
		if (x % 4 == 3) {
			out.println(Math.max(5, 2 * i + 1));
			return;
		}
		out.println(2 * i + 1);
	}
}

import java.io.*;
import java.util.*;

public class C {
    public static void main(String[] args) throws Exception {
        new C().solve();
    }
    void solve() throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int x = Integer.parseInt(in.readLine());
        if (x == 1) {
            System.out.println(1);
            return;
        } else if (x == 3) {
            System.out.println(5);
            return;
        } else {
            for (int n = 3;; n++) {
                if (n % 2 == 1) {
                    // odd
                    if (x <= n * n / 2 + 1) {
                        System.out.println(n);
                        return;
                    }
                } else {
                    // even
                    int k = n / 2 - 1;
                    int upper = k % 2 == 0 ? k * k / 2 : k * k / 2 + 1;
                    if (x % 4 == 0 && x <= 4 * upper) {
                        System.out.println(n);
                        return;
                    }
                }
            }

        }
    }
}

import java.util.*;

public class Main {

  public static void main(String args[]) {
    (new Main()).solve();
  }

  void solve() {

    Scanner cin = new Scanner(System.in);

    while( cin.hasNextInt() ) {

      int n = cin.nextInt();
      // odd only;
      for(int i=1; i<40; i+=2) {
        int can = i * i / 2 + 1;
        if( n == 3 && i == 3 ) { continue; }
        if( n <= can ) {
          System.out.println(i);
          break;
        }
      }

    }

  }

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int x = in.nextInt();
        if (x == 1) out.printLine(1);
        else if (x == 2) out.printLine(3);
        else if (x == 3) out.printLine(5);
        else {
            int t = (int) Math.sqrt(2 * x - 1);
            //out.printLine("t = " + t);
            if (t * t + 1 == 2 * x) {
                out.printLine(t);
            }
            else {
                if (t % 2 == 0)
                    out.printLine(t + 1);
                else
                    out.printLine(t + 2);
            }
        }
    }
}

class InputReader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
		return Integer.parseInt(next());
	}

	}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(outputStream);
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }
}

import java.util.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

public class  test{

	//ArrayList<Integer> lis = new ArrayList<Integer>();
	//ArrayList<String> lis = new ArrayList<String>();
	//
//	static long sum=0;
	//int a,b,c;
	//1000000007 (10^9+7)
	//static int mod = 1000000007;
   // static int d[][];
	//static int dx[]={1,-1,0,0};
	//static int dy[]={0,0,1,-1};

public  static void main(String[] args) {

   Scanner sc =new Scanner(System.in);
   while(sc.hasNext()){
		 // =ni(sc)
	   //long sum=0;
		//int  n=sc.nextInt();
	   int  n=sc.nextInt();
	   if(n==3){System.out.println(5);return;}
	   for(int c=1,i=0;true;i++,c+=4*i){
		   if(n<=c){System.out.println(2*i+1);break;}

	   }

	   }

}

static void db(Object... os){
    System.err.println(Arrays.deepToString(os));

}

}

/*class P {
//	implements Comparable<P>

	int v,m,t,mm;
	P(int v,int m,int mm,int t){
		this.na=na;
	    this.v=v;
	    this.m=m;
	    this.mm=mm;
	    this.t=t;
	}

	   public int compareTo(P x){

		   }

}
*/

import java.io.* ;
import java.util.*;

import static java.lang.Math.* ;
import static java.util.Arrays.* ;

public class A {

	public static void main(String[] args) throws IOException {

		new A().solveProblem();

		out.close();
	}

	static Input in = new Input() ;
	static PrintStream out = new PrintStream(new BufferedOutputStream(System.out));
	static Output out2 = new Output(out) ;

	public void solveProblem() throws IOException {

		int x = in.nextInt() ;

		if( x == 3 ){
			out.println(5) ;
			return ;
		}
		for( int i = 1 ; i <= 100 ; i+=2 ){
			int tot = ((i+1) / 2 ) * ((i+1) / 2 ) ;
			tot += (i/2) * (i/2) ;
			if( tot >= x ){
				out.println(i) ;
				return ;
			}
		}

	}

	static void p( Object ...p){
		System.out.println(Arrays.deepToString(p));
	}

	static class Input {

		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tokens ;

		public int nextInt(){
			return Integer.parseInt(next()) ;
		}

		public int[] nextInt(int n ){
			int[] res = new int[n] ;
			for( int i = 0 ; i < n ; i++ )
				res[i] = nextInt() ;
			return res ;
		}

		public long nextLong(){
			return Long.parseLong(next()) ;
		}

		public long[] nextLong(int n ){
			long[] res = new long[n] ;
			for( int i = 0 ; i < n ; i++ )
				res[i] = nextLong() ;
			return res ;
		}

		public double nextDouble(){
			return Double.parseDouble(next()) ;
		}

		public String next(){

			try{
				while( tokens == null || !tokens.hasMoreTokens() )
					tokens = new StringTokenizer(buf.readLine()) ;
			}catch( Exception e ){
				e.printStackTrace() ;
			}

			return tokens.nextToken() ;
		}

	}

	static class Output {

		PrintStream out ;

		public Output(PrintStream out) {
			this.out = out;
		}

		void wr( int[] rij ){
			for( int i = 0 ; i < rij.length - 1 ; i++ )
				out.print(rij[i] + " ") ;
			out.println(rij[rij.length-1]);
		}

		void wr( long[] rij ){
			for( int i = 0 ; i < rij.length - 1 ; i++ )
				out.print(rij[i] + " ") ;
			out.println(rij[rij.length-1]);
		}

		void wr( char[] rij){
			out.println(new String(rij)) ;
		}

	}

}

import java.io.*;
import java.util.*;
public class a201
{
    public static void main(String args[])throws IOException
    {
        InputStreamReader read=new InputStreamReader(System.in);
        BufferedReader in=new BufferedReader(read);
        int n=5,i,j,k,x;
        //System.out.println("Enter");
        x=Integer.parseInt(in.readLine());
        if(x==1)
        System.out.println("1");
        else
        if(x>1 && x<=5 && x!=3)
        System.out.println("3");
        else
        {
        while(true)
        {
            i=n/2;
            j=n*i+(i+1);
            if(x<=j)
            break;
            else
            n+=2;
        }
        System.out.println(n);
        }
    }
}

import java.io.*;
import java.util.*;

public class Matrix {
	void solve() throws IOException {
		int x = nextInt();

		int n;

		if (x == 3) {
			n = 5;
		} else {
			int s = 2 * x;
			if (x % 2 == 1) {
				s--;
			}

			double sqrt = Math.pow((double) s, 0.5);
			sqrt = Math.floor(sqrt);

			n = (int) sqrt;
			if (n * n != s) {
				n++;
			}

			if (n % 2 == 0) {
				n++;
			}
		}

		out.println(n);
	}

	void run() throws IOException {
		//reader = new BufferedReader(new FileReader("B-large.in"));
		reader = new BufferedReader(new InputStreamReader(System.in));
		tokenizer = null;
		//out = new PrintWriter(new FileWriter("B-large.out"));
		out = new PrintWriter(new OutputStreamWriter(System.out));
		solve();
		reader.close();
		out.flush();
	}

	public static void main(String[] args) throws IOException {
		new Matrix().run();
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter out;

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}
}

import java.io.*;
import java.util.*;

public class Main {

	static InputReader in = new InputReader(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	static long oo = (long)1e15;

	public static void main(String[] args) throws IOException {

		int x = in.nextInt();
		int M = 100000;
		int ans = 0;
		for(int n = 1; n < M; n += 2) {
			int h = n / 2;
			int[] max = new int[5];
			max[4] = (h * h + 1) / 2;
			max[2] = h / 2 * 2;
			max[1] = 1;
			if(poss(x, max)) {
				ans = n;
				break;
			}
			if(h % 2 == 1) {
				max[4]--;
				max[2] += 2;
				max[1] = 0;
				if(poss(x, max)) {
					ans = n;
					break;
				}
			}
		}
		System.out.println(ans);

		out.close();
	}

	static boolean poss(int x, int[] max) {
		x -= Math.min(x / 4, max[4]) * 4;
		x -= Math.min(x / 2, max[2]) * 2;
		x -= Math.min(x, max[1]);
		return x == 0;
	}

	static int[] getPi(char[] a) {
		int m = a.length;
		int j = 0;
		int[] pi = new int[m];
		for(int i = 1; i < m; ++i) {
			while(j > 0 && a[i] != a[j])
				j = pi[j-1];
			if(a[i] == a[j]) {
				pi[i] = j + 1;
				j++;
			}
		}
		return pi;
	}

	static long lcm(long a, long b) {
		return a * b / gcd(a, b);
	}

	static boolean nextPermutation(int[] a) {
		for(int i = a.length - 2; i >= 0; --i) {
			if(a[i] < a[i+1]) {
				for(int j = a.length - 1; ; --j) {
					if(a[i] < a[j]) {
						int t = a[i];
						a[i] = a[j];
						a[j] = t;
						for(i++, j = a.length - 1; i < j; ++i, --j) {
							t = a[i];
							a[i] = a[j];
							a[j] = t;
						}
						return true;
					}
				}
			}
		}
		return false;
	}

	static void shuffle(int[] a) {
		Random r = new Random();
		for(int i = a.length - 1; i > 0; --i) {
			int si = r.nextInt(i);
			int t = a[si];
			a[si] = a[i];
			a[i] = t;
		}
	}

	static void shuffle(long[] a) {
		Random r = new Random();
		for(int i = a.length - 1; i > 0; --i) {
			int si = r.nextInt(i);
			long t = a[si];
			a[si] = a[i];
			a[i] = t;
		}
	}

	static int lower_bound(int[] a, int n, int k) {
		int s = 0;
		int e = n;
		int m;
		while (e - s > 0) {
			m = (s + e) / 2;
			if (a[m] < k)
				s = m + 1;
			else
				e = m;
		}
		return e;
	}
	static int lower_bound(long[] a, int n, long k) {
		int s = 0;
		int e = n;
		int m;
		while (e - s > 0) {
			m = (s + e) / 2;
			if (a[m] < k)
				s = m + 1;
			else
				e = m;
		}
		return e;
	}

	static int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}
	static long gcd(long a, long b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	static class Pair implements Comparable<Pair> {
		int first, second;

		public Pair(int first, int second) {
			super();
			this.first = first;
			this.second = second;
		}

		@Override
		public int compareTo(Pair o) {
			return this.first != o.first ? this.first - o.first : this.second - o.second;
		}

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + first;
			result = prime * result + second;
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Pair other = (Pair) obj;
			if (first != other.first)
				return false;
			if (second != other.second)
				return false;
			return true;
		}
	}
}

class InputReader {

	private final InputStream stream;
	private final byte[] buf = new byte[8192];
	private int curChar, snumChars;

	public InputReader(InputStream st) {
		this.stream = st;
	}

	public int read() {
		if (snumChars == -1)
			throw new InputMismatchException();
		if (curChar >= snumChars) {
			curChar = 0;
			try {
				snumChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (snumChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int nextInt() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public long nextLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public int[] nextIntArray(int n) {
		int a[] = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = nextInt();
		}
		return a;
	}

	public String readString() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	public String nextLine() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isEndOfLine(c));
		return res.toString();
	}

	public boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	private boolean isEndOfLine(int c) {
		return c == '\n' || c == '\r' || c == -1;
	}

}

import java.util.*;
import java.io.*;

public class Main
{
    public static void main(String arg[])
    {
        new Main();
    }
    public Main()
    {
        new TaskA();
    }
}

class TaskA
{
    public TaskA()
    {
        Scanner cin=new Scanner(new BufferedInputStream(System.in));
        int a[]=new int[100+2];
        for (int n=1;n<=100;n++)
            if (n%2==0) a[n]=(((n/2-1)*(n/2-1)+1)/2*4);
            else a[n]=((n*n+1)/2);
        int n=cin.nextInt();
        int q=n%4;
        for (int i=1;i<=100;i++)
        {
            if (q==0&&(i%2==0?a[i]>=n:a[i]-1>=n))
            {
                System.out.println(i);
                break;
            }
            else if (q==1&&(i%2==0?false:a[i]>=n))
            {
                System.out.println(i);
                break;
            }
            else if (q==2&&(i%2==0?false:((i+1)/4*4>=2?a[i]-3>=n:false)))
            {
                System.out.println(i);
                break;
            }
            else if (q==3&&(i%2==0?false:(i/4*4>=2?a[i]-2>=n:false)))
            {
                System.out.println(i);
                break;
            }
        }
        cin.close();
    }
}

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map.Entry;
import java.util.Scanner;

public class Main {

    public void dfs(){
    }

    public void solve() {
        Scanner sc=new Scanner(System.in);

        int n=sc.nextInt();

        if(n==1){
            ln(1);
            return;
        }
        if(n==3){
            ln(5);
            return;
        }

        if(1<=n && n<=5){
            ln(3);
            return;
        }
        if(5<n && n<=13){
            ln(5);
            return;
        }
        if(13<n && n<=25){
            ln(7);
            return;
        }
        if(25<n && n<=41){
            ln(9);
            return;
        }
        if(41<n && n<=61){
            ln(11);
            return;
        }
        if(61<n && n<=85){
            ln(13);
            return;
        }
        if(85<n && n<=100){
            ln(15);
            return;
        }
    }

    public void run() {
        solve();
    }

    public static void main(String[] _) {
        new Main().run();
    }

    public static void ln() {
        System.out.println();
    }
    public static void ln(Object o) {
        System.out.println(o);
    }

    public static void pr(Object o) {
        System.out.print(o);
    }

}

import java.util.Scanner;

public class NewProblem {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int x = s.nextInt();
        if (x==3) {
            System.out.println(5);
            System.exit(0);
        }
        for (int i=0; i<20; i++) {
            if (i%2==0) continue;
            int y = ((i/2)*(i/2))+((i/2+1)*(i/2+1));
            if (x<=y) {
                System.out.println(i);
                System.exit(0);
            }
        }
    }
}

	import java.io.*;
import java.util.*;

	public class CODEFORCES {
		private InputStream is;
		private PrintWriter out;
		int time = 0, val[][], dp[][], DP[], start[], end[], dist[],  black[], MOD = (int)(1e9+7), arr[], weight[][], x[], y[], parent[];
		int MAX = 800000, N, K;
		long red[];
		ArrayList<Integer>[] amp;
		//boolean b[], boo[][];
		Pair prr[];
		HashSet<Integer> hs = new HashSet<>();
		long Dp[][][][] = new long[110][110][12][12];
		void soln() {
			is = System.in;
			out = new PrintWriter(System.out);
			long s = System.currentTimeMillis();
			solve();
			//out.close();
			out.flush();
			//tr(System.currentTimeMillis() - s + "ms");
		}
		public static void main(String[] args) throws Exception {
			new Thread(null, new Runnable() {
			public void run() {
				try {

			//new CODEFORCES().soln();
			} catch (Exception e) {
					System.out.println(e);
				}
			}
		}, "1", 1 << 26).start();
			new CODEFORCES().soln();
		}
		int a,b;
		void solve() {
			int x = ni();
			int arr[] = new int[100];
			arr[1] = 1; arr[2]  =2;
			if(x==3){
				System.out.println(5);
				return;
			}
			for(int i = 3;i<100;i++){
				int sum = 0;
				for(int j = i%2;j<i;j+=2)
				sum += j;
				arr[i] = 2*sum+i;
			}
			for(int i = 1;i<100;i++){
				if(arr[i]>=x){
					System.out.println(i+(1-i%2));
					break;
				}
			}
			//System.out.println(arr[5]+" "+arr[99]);
		}
		boolean check(int ans){
			while(ans>0){
				int c = ans%10;
				if(!(c==a||c==b)) return false;
				ans/=10;
			}
			return true;
		}
		long npr(long[] power, int n,int r){
			if(r>n) return 0;
			return (((power[n]*power(power[r], MOD-2, MOD))%MOD)*power(power[n-r], MOD-2, MOD))%MOD;
		}

		class Pair implements Comparable<Pair>{
			int u, v, i;
			Pair(int u, int v){
				this.u = u;
				this.v = v;
			}
			Pair(int u, int v, int i){
				this.u = u;
				this.v = v;
				this.i = i;
			}
			public int hashCode() {
				return Objects.hash();
			}
			/*public boolean equals(Object o) {
				Pair other = (Pair) o;
				return ((u == other.u && v == other.v) || (v == other.u && u == other.v));
			}*/
			public int compareTo(Pair other) {
				//return Integer.compare(val, other.val);
				return Long.compare(u, other.u) != 0 ? (Long.compare(u, other.u)) : (Long.compare(v,other.v));
			}
			public String toString(){
				return this.u +" " + this.v;
			}
		}
		int max(int a, int b){
			if(a>b) return a;
			return b;
		}

		void buildGraph(int n){
			for(int i = 0; i<n ;i++){
				int x1 = ni() -1, y1 = ni()-1;
				amp[x1].add(y1);
				amp[y1].add(x1);
				x[i] = x1; y[i] = y1;
			}
		}
		long modInverse(long a, long mOD2){
	        return  power(a, mOD2-2, mOD2);
		}
		long power(long x, long y, long m)
		{
			if (y == 0)
	    return 1;
		long p = power(x, y/2, m) % m;
		p = (p * p) % m;

		return (y%2 == 0)? p : (x * p) % m;
		}
		public long gcd(long a, long b){
			if(b==0) return a;
			return gcd(b,a%b);
		}
		static class ST1{
			int arr[], st[], size;
			ST1(int a[]){
				arr = a.clone();
				size = 10*arr.length;
				st = new int[size];
				build(0,arr.length-1,1);
			}
			void build(int ss, int se, int si){
				if(ss==se){
					st[si] = arr[ss];
					return;
				}
				int mid = (ss+se)/2;
				int val = 2*si;
				build(ss,mid,val); build(mid+1,se,val+1);
				st[si] = Math.min(st[val], st[val+1]);
			}
			int get(int ss, int se, int l, int r, int si){
				if(l>se || r<ss || l>r) return Integer.MAX_VALUE;
				if(l<=ss && r>=se) return st[si];
				int mid = (ss+se)/2;
				int val = 2*si;
				return Math.min(get(ss,mid,l,r,val), get(mid+1,se,l,r,val+1));
			}
		}
		static class ST{
			int arr[],lazy[],n;
			ST(int a){
				n = a;
				arr = new int[10*n];
				lazy = new int[10*n];
			}
			void up(int l,int r,int val){
				update(0,n-1,0,l,r,val);
			}
			void update(int l,int r,int c,int x,int y,int val){
				if(lazy[c]!=0){
					lazy[2*c+1]+=lazy[c];
					lazy[2*c+2]+=lazy[c];
					if(l==r)
						arr[c]+=lazy[c];
					lazy[c] = 0;
				}
				if(l>r||x>y||l>y||x>r)
					return;
				if(x<=l&&y>=r){
					lazy[c]+=val;
					return ;
				}
				int mid = l+r>>1;
				update(l,mid,2*c+1,x,y,val);
				update(mid+1,r,2*c+2,x,y,val);
				arr[c] = Math.max(arr[2*c+1], arr[2*c+2]);
			}
			int an(int ind){
				return ans(0,n-1,0,ind);
			}
			int ans(int l,int r,int c,int ind){
				if(lazy[c]!=0){
					lazy[2*c+1]+=lazy[c];
					lazy[2*c+2]+=lazy[c];
					if(l==r)
						arr[c]+=lazy[c];
					lazy[c] = 0;
				}
				if(l==r)
					return arr[c];
				int mid = l+r>>1;
				if(mid>=ind)
					return ans(l,mid,2*c+1,ind);
				return ans(mid+1,r,2*c+2,ind);
			}
		}
		public static int[] shuffle(int[] a, Random gen){
			for(int i = 0, n = a.length;i < n;i++)
			{
				int ind = gen.nextInt(n-i)+i;
				int d = a[i];
				a[i] = a[ind];
				a[ind] = d;
			}
		return a;
		}
		long power(long x, long y, int mod){
			long ans = 1;
			while(y>0){
				if(y%2==0){
					x = (x*x)%mod;
					y/=2;
				}
				else{
					ans = (x*ans)%mod;
					y--;
				}
			}
			return ans;
		}

		// To Get Input
		// Some Buffer Methods
		private byte[] inbuf = new byte[1024];
		public int lenbuf = 0, ptrbuf = 0;

		private int readByte() {
			if (lenbuf == -1)
				throw new InputMismatchException();
			if (ptrbuf >= lenbuf) {
				ptrbuf = 0;
				try {
					lenbuf = is.read(inbuf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (lenbuf <= 0)
					return -1;
			}
			return inbuf[ptrbuf++];
		}

		private boolean isSpaceChar(int c) {
			return !(c >= 33 && c <= 126);
		}

		private int skip() {
			int b;
			while ((b = readByte()) != -1 && isSpaceChar(b))
				;
			return b;
		}

		private double nd() {
			return Double.parseDouble(ns());
		}

		private char nc() {
			return (char) skip();
		}
		private String ns() {
			int b = skip();
			StringBuilder sb = new StringBuilder();
			while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '
										// ')
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}

		private char[] ns(int n) {
			char[] buf = new char[n];
			int b = skip(), p = 0;
			while (p < n && !(isSpaceChar(b))) {
				buf[p++] = (char) b;
				b = readByte();
			}
			return n == p ? buf : Arrays.copyOf(buf, p);
		}

		private char[][] nm(int n, int m) {
			char[][] map = new char[n][];
			for (int i = 0; i < n; i++)
				map[i] = ns(m);
			return map;
		}

		private int[] na(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = ni();
			return a;
		}

		private int ni() {
			int num = 0, b;
			boolean minus = false;
			while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
				;
			if (b == '-') {
				minus = true;
				b = readByte();
			}

			while (true) {
				if (b >= '0' && b <= '9') {
					num = num * 10 + (b - '0');
				} else {
					return minus ? -num : num;
				}
				b = readByte();
			}
		}

		private long nl() {
			long num = 0;
			int b;
			boolean minus = false;
			while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
				;
			if (b == '-') {
				minus = true;
				b = readByte();
			}

			while (true) {
				if (b >= '0' && b <= '9') {
					num = num * 10 + (b - '0');
				} else {
					return minus ? -num : num;
				}
				b = readByte();
			}
		}

		private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

		private void tr(Object... o) {
			if (!oj)
				System.out.println(Arrays.deepToString(o));
		}
	}

import java.util.Scanner;

public class ClearSymmetry {
	public static void main(String args[]) {
		Scanner cin = new Scanner(System.in);
		while (cin.hasNextInt()) {
			int n, i;
			n = cin.nextInt();
			if (n == 3) {
				i = 5;
			} else {
				for (i = 1; (i * i + 1) / 2 < n; i += 2) {
					;
				}
			}
			System.out.println(i);
		}
	}

	public static boolean solve(int n, int x) {
		return false;
	}
}

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Crash
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
		int x = in.readInt();
		if (x == 1) {
			out.printLine(1);
			return;
		}
		if (x == 3) {
			out.printLine(5);
			return;
		}
		for (int i = 3; ; i += 2)
			if ((i * i + 1) / 2 >= x) {
				out.printLine(i);
				return;
			}
	}
}

class InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1000];
	private int curChar;
	private int numChars;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	private int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	private boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}
}

import java.util.Scanner;

public class Matrix {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int lowermax=1;
        int uppermax=1;
        int side=-1;
       do {
           side+=2;
            lowermax= uppermax;
            uppermax= (((side/2)+1)*((side/2)+1)) + ((side/2)*(side/2));

        } while ( num > uppermax );
        if  (num!=3)
 {System.out.println(side);}
        else
            System.out.println(5);
    }

}

import java.util.Scanner;
public class Main{
	public static void main (String args[]){
		Scanner in = new Scanner(System.in);
		while(in.hasNextInt()){
			int n, i;
		    n=in.nextInt();
		    if(n==3) i=5;
		    else
		        for(i=1; (i*i+1)/2<n; i+=2);
		    System.out.println(i);
		}
	}
	public static boolean solve(int n , int x){
		return false ;
	}
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

import java.util.*;
import java.lang.*;

/**
 *
 * @author Bryan AW
 */
public class Codeforces {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args){

        //Clear Symmetry

        Scanner sc=new Scanner(System.in);

        int x=sc.nextInt();

        int n=1, l=1, r=1;

        while (x!=l && (x<l*2||x>r)){
            n+=2;
            l=(n+1)/2;
            r=(n*n+1)/2;
        }

        System.out.println(n);

    }

}

    import java.util.*;
    import java.io.*;
    import java.math.*;

    public class C {
        public static Scanner scan = new Scanner(System.in);
        public static boolean bg = true;

        public static void main(String[] args) throws Exception {
            TreeMap<Integer,Integer> odd = new TreeMap();
            int cur = 1;
            for (int i=1;i<=100;i+=2){
                odd.put(cur, i);
                cur+=(i+1)*2;
            }

            TreeMap<Integer,Integer> even = new TreeMap();
            for (int i=2;i<=100;i+=2){
                int k1 = i/4;
                int add1 = k1*k1*4;

                int k2 = (i-1)/4;
                int add2 = k2*k2*4;
                even.put(add1+add2, i);
            }
            //if (bg) System.out.println(odd);
            //if (bg) System.out.println(even);
            int k1 = Integer.parseInt(scan.next());
            System.out.println(ans(k1));

        }
        public static int ans (int n1){
            if (n1==1) return 1;
            if (n1%4==0){
                int k1 = n1/4;
                for (int i=0;i<=1000;i++){
                    k1 -= i;
                    if (k1<=0) return i*2+1;
                }
            }
            else if (n1%4==1){

                return ans(n1-1);
            }
            else if (n1%4==2){
                return (ans(n1+2));
            }
            else if (n1%4==3){
                if (n1==3) return 5;
                else {
                    return (ans(n1+2));
                }
            }
            return -1;
        }
    }

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Egor Kulikov (egor@egork.net)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
		int sharpness = in.readInt();
		if (sharpness == 3) {
			out.printLine(5);
			return;
		}
		for (int size = 1; ; size += 2) {
			int maxSharpness = (size * size + 1) / 2;
			if (maxSharpness >= sharpness) {
				out.printLine(size);
				return;
			}
		}
	}
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public static boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}

	}

import java.io.*;
import java.util.*;

public class Matrix {
	void solve() throws IOException {
		int x = nextInt();

		int s = 2 * x;
		if (x % 2 == 1) {
			s--;
		}

		double sqrt = Math.pow((double) s, 0.5);
		sqrt = Math.floor(sqrt);

		int n = (int) sqrt;
		if (n * n != s) {
			n++;
		}

		out.println(n);
	}

	void run() throws IOException {
		//reader = new BufferedReader(new FileReader("B-large.in"));
		reader = new BufferedReader(new InputStreamReader(System.in));
		tokenizer = null;
		//out = new PrintWriter(new FileWriter("B-large.out"));
		out = new PrintWriter(new OutputStreamWriter(System.out));
		solve();
		reader.close();
		out.flush();
	}

	public static void main(String[] args) throws IOException {
		new Matrix().run();
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter out;

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.HashMap;
import java.util.Map.Entry;

public class C {

    private StreamTokenizer in;
    private PrintWriter out;

    public static void main (String[] args) throws IOException {
        new C().solve();
    }

    int nextInt () throws IOException {
        in.nextToken();
        return (int)in.nval;
    }

    void solve () throws IOException {
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(new OutputStreamWriter(System.out));

        int n = nextInt();
        if (n == 3) {
            out.print(5);
            out.flush();
            return;
        }

        int i = 3;
        while (true) {
            int res = (int)Math.pow(i / 2, 2) + (int)Math.pow((i / 2) + 1, 2);
            if (res >= n) {
                out.print(i);
                out.flush();
                return;
            }
            i += 2;
        }
    }

}

import java.util.*;
import java.io.*;

public class Main implements Runnable {

	public void solve() throws IOException {
		int N = nextInt();
                if(N == 1 || N == 2) out.println(N);
                else if(N == 3) out.println(5);
                else{
                    int i = 0;
                    for(i = 1; ; i += 2) if(get(i) >= N) break;
                    out.println(i);
                }
	}

        private int get(int x){
            return x * (x + 1) / 2;
        }

	//-----------------------------------------------------------
	public static void main(String[] args) {
		new Main().run();
	}

        public void debug(Object... arr){
            System.out.println(Arrays.deepToString(arr));
        }

        public void print1Int(int[] a){
                for(int i = 0; i < a.length; i++)
                        System.out.print(a[i] + " ");
                System.out.println();
        }

        public void print2Int(int[][] a){
                for(int i = 0; i < a.length; i++){
                        for(int j = 0; j < a[0].length; j++){
                                System.out.print(a[i][j] + " ");
                        }
                        System.out.println();
                }
        }

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
                        out = new PrintWriter(System.out);
			tok = null;
			solve();
			in.close();
                        out.close();
		} catch (IOException e) {
			System.exit(0);
		}
	}

	public String nextToken() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
        PrintWriter out;
	BufferedReader in;
	StringTokenizer tok;
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) throws Exception
    {

        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        for (int n = 1 ; ; n += 2){
            if (((n >> 1) & 1) == 0){
                int can = 1 + ((((n >> 1) + 1) * (n >> 1 >> 1) + ((n >> 1)) * (n >> 1 >> 1)) << 1);
                can += ((n >> 1));
                if (can >= x) {
                    System.out.println(n);
                    break;
                }

            }
            else {
                int can = 1 + ((((n >> 1) + 1) * (n >> 1 >> 1) + (((n >> 1)) * ((n >> 1 >> 1) + 1))) << 1);
                can += ((n >> 1) + 1);
                if (can >= x) {
                    System.out.println(n);
                    break;
                }
            }

        }
    }
}

import java.io.*;
import java.util.*;

public class C {
	static Scanner scan = new Scanner (System.in);
	static PrintStream out = System.out;

	public static void main (String[] args) {
		int x = scan.nextInt();
		int n = 1;
		while (n*n/2+1 < x) {
			n += 2;
		}
		out.println (n);
	}
}

import java.util.Scanner;

public class C {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int n = 0;
        if(x == 1){
            n = 1;
        }else if (x == 2) {
            n = 2;
        }else if (x == 3) {
            n = 5;
        }else {
            n = (int) Math.ceil(Math.sqrt(2*x-1));
        }
        System.out.println(n);
    }
}

//package Round_127;

import java.util.Scanner;

public class c_beta {

	static long sum1(int n){
		long sum = n;
		n-=2;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	static long sum2(int n){
		n--;
		long sum = 0;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x = in.nextInt();
		int n = 1;
		//while (sum1(n) < x && sum2(n) < x) n++;
		n = (x / 4)*2  + (x % 4 == 1 || x % 4 == 2 ? 1 : x % 4 != 0 ? 1 : 1);
		System.out.println(n);
	}

}

import java.io.*;
import java.util.*;
import java.lang.*;
import java.math.*;

public class cf {
    public static void main(String[] args) {
        try {
            InputStream inputStream=System.in;
            OutputStream outputStream=System.out;
            //InputStream inputStream=new FileInputStream("paint.in");
            //OutputStream outputStream=new FileOutputStream("paint.out");
            InputReader in=new InputReader(inputStream);
            PrintWriter out=new PrintWriter(outputStream);
            Task task=new Task();
            task.run(in,out);
            out.close();
        } catch (Exception e) {
            if (e instanceof FileNotFoundException) {System.out.print("File not found.");}
            else {e.printStackTrace();}
        }
    }
}

class InputReader {
    private BufferedReader br;
    private StringTokenizer st;
    public InputReader(InputStream stream) {
        br=new BufferedReader(new InputStreamReader(stream),32768);
        st=null;
    }
    public String next() {
        while (st==null || !st.hasMoreTokens()) {
            try {
                st=new StringTokenizer(br.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return st.nextToken();
    }
    public int nextInt() {return Integer.parseInt(next());}
    public long nextLong() {return Long.parseLong(next());}
    public double nextDouble() {return Double.parseDouble(next());}
    public int[] nextIntArray(int n) {
        int[] a=new int[n];
        for (int i=0;i<n;i++) {a[i]=nextInt();}
        return a;
    }
    public long[] nextLongArray(int n) {
        long[] a=new long[n];
        for (int i=0;i<n;i++) {a[i]=nextLong();}
        return a;
    }
}

class Utils {
    public static void shuffleint(int[] a) {
        int n=a.length,tmp,pi;
        Random r=new Random();
        for (int i=0;i<n;++i) {
            tmp=a[i];
            pi=i+r.nextInt(n-i);
            a[i]=a[pi];
            a[pi]=tmp;
        }
    }
    public static void shufflelong(long[] a) {
        int n=a.length,pi;
        long tmp;
        Random r=new Random();
        for (int i=0;i<n;++i) {
            tmp=a[i];
            pi=i+r.nextInt(n-i);
            a[i]=a[pi];
            a[pi]=tmp;
        }
    }
    public static void sortint(int[] a) {
        shuffleint(a);
        Arrays.sort(a);
    }
    public static void sortlong(long[] a) {
        shufflelong(a);
        Arrays.sort(a);
    }
}

class Task {
    public void run(InputReader in,PrintWriter out) {
	    int x=in.nextInt();
	    int[] a={1,1,3,5,3};
	    if (x<5) {
	        out.print(a[x]);
	    }
	    else {
	        int n=5;
	        while (x>(n*n+1)/2) {
	            n+=2;
	        }
	        out.print(n);
	    }
    }
}

import java.util.*;
import java.io.*;

public class Solution {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int x = in.nextInt();

        if (x == 3) {
            System.out.println(5);
            return;
        }

        int capacity = 0;
        int n = 0;
        while (capacity < x) {
            capacity += 1 + 2 * (n / 2);
            n++;
        }

        System.out.println(n);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg) {
        new Solution().run();
    }
}

import java.io.* ;
import java.util.*;

import static java.lang.Math.* ;
import static java.util.Arrays.* ;

public class A {

	public static void main(String[] args) throws IOException {

		new A().solveProblem();

		out.close();
	}

	static Input in = new Input() ;
	static PrintStream out = new PrintStream(new BufferedOutputStream(System.out));
	static Output out2 = new Output(out) ;

	public void solveProblem() throws IOException {

		int x = in.nextInt() ;

		if( x == 3 ){
			out.println(5) ;
			return ;
		}
		for( int i = 1 ; i <= 100 ; i+=2 ){
			int tot = ((i+1) / 2 ) * ((i+1) / 2 ) ;
			tot += (i)/2 * (i)/2 ;
			if( tot >= x ){
				out.println(i) ;
				return ;
			}
		}

	}

	static void p( Object ...p){
		System.out.println(Arrays.deepToString(p));
	}

	static class Input {

		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tokens ;

		public int nextInt(){
			return Integer.parseInt(next()) ;
		}

		public int[] nextInt(int n ){
			int[] res = new int[n] ;
			for( int i = 0 ; i < n ; i++ )
				res[i] = nextInt() ;
			return res ;
		}

		public long nextLong(){
			return Long.parseLong(next()) ;
		}

		public long[] nextLong(int n ){
			long[] res = new long[n] ;
			for( int i = 0 ; i < n ; i++ )
				res[i] = nextLong() ;
			return res ;
		}

		public double nextDouble(){
			return Double.parseDouble(next()) ;
		}

		public String next(){

			try{
				while( tokens == null || !tokens.hasMoreTokens() )
					tokens = new StringTokenizer(buf.readLine()) ;
			}catch( Exception e ){
				e.printStackTrace() ;
			}

			return tokens.nextToken() ;
		}

	}

	static class Output {

		PrintStream out ;

		public Output(PrintStream out) {
			this.out = out;
		}

		void wr( int[] rij ){
			for( int i = 0 ; i < rij.length - 1 ; i++ )
				out.print(rij[i] + " ") ;
			out.println(rij[rij.length-1]);
		}

		void wr( long[] rij ){
			for( int i = 0 ; i < rij.length - 1 ; i++ )
				out.print(rij[i] + " ") ;
			out.println(rij[rij.length-1]);
		}

		void wr( char[] rij){
			out.println(new String(rij)) ;
		}

	}

}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Pr201A {
	public static void main(String[] args) throws IOException {
		new Pr201A().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st;

	String nextToken() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out, true);
		solve();
		out.flush();
	}

	void solve() throws IOException {
		int x = nextInt();
		int[] ds = new int[8];
		for (int i = 0; i < 8; i++) {
			ds[i] = ((2 * i + 1) * (2 * i + 1)) / 2 + 1;
		}
		int i = 0;
		while (i < 8 && ds[i] < x) {
			i++;
		}
		out.println(2 * i + 1);
	}
}

import java.io.*;
import java.util.*;
import java.math.*;
import java.text.*;
public class Main1 {
    public static class Node implements Comparable<Node>
    {
        int value;
        int iteration;
        public Node(int value, int interation)
        {
            this.value = value;
            this.iteration = interation;
        }
        @Override
        public int compareTo(Node o) {
            // TODO Auto-generated method stub
            return new Integer(iteration).compareTo(o.iteration);
        }

    }
public static void main(String[] args) throws IOException {
    BufferedReader in;
    StringBuilder out = new StringBuilder();
    File file = new File("input.txt");
    if (file.exists())
        in = new BufferedReader(new FileReader(file));
    else
        in = new BufferedReader(new InputStreamReader(System.in));
    String line, lines[];
    PriorityQueue<Node> p = new PriorityQueue<Node>();

    p.add(new Node(0, 0));
    p.add(new Node(1, 0));
    p.add(new Node(2, 1));
    p.add(new Node(3, 1));
    int av, ai;
    Node aux;
    boolean visited[] = new boolean[101];
    int sizes[] = new int[101];
    while(!p.isEmpty())
    {
        aux = p.poll();
        if ( aux.value > 100 ) continue;
        if ( visited[aux.value] ) continue;
        visited[aux.value] = true;
        sizes[aux.value] = 2*aux.iteration+1;
        for( int i = 1; i <= aux.iteration+1; i++ )
        {
            p.add(new Node(i*4+aux.value, aux.iteration+1));
        }

    }
    //int n = Integer.parseInt(in.readLine());
    //System.out.println("hola "+n);
    System.out.println(sizes[Integer.parseInt(in.readLine())]);
}
}

    import java.util.*;
    import java.io.*;
    import java.math.*;

    public class C {
        public static Scanner scan = new Scanner(System.in);
        public static boolean bg = true;

        public static void main(String[] args) throws Exception {
            TreeMap<Integer,Integer> odd = new TreeMap();
            int cur = 1;
            for (int i=1;i<=100;i+=2){
                odd.put(cur, i);
                cur+=(i+1)*2;
            }

            TreeMap<Integer,Integer> even = new TreeMap();
            for (int i=2;i<=100;i+=2){
                int k1 = i/4;
                int add1 = k1*k1*4;

                int k2 = (i-1)/4;
                int add2 = k2*k2*4;
                even.put(add1+add2, i);
            }
            //System.out.println(odd);
            //System.out.println(even);
            int k1 = Integer.parseInt(scan.next());
            int fin = odd.ceilingEntry(k1).getValue();

            for (int e: odd.keySet()){
                if ((k1-e)%4==0
                        && e>=k1
                        ){
                    fin = odd.get(e);
                    break;
                }
            }

            int temp = Integer.MAX_VALUE;
            for (int e: even.keySet()){
                if ((k1-e)%4==0
                        && e>=k1
                        ){
                    fin = even.get(e);
                    break;
                }
            }
            if (temp<fin) fin = temp;
            System.out.println(fin);
            System.exit(0);
        }
    }

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.PriorityQueue;
import java.util.TreeMap;
import java.util.TreeSet;

public class Q21 {
	static long MOD = 1000000007;
	static TreeSet<Long> hs = new TreeSet<>();
	static ArrayList<Pair>[][] amp;
	static ArrayList<Pair> amp2;
	static boolean b[][];
	static int comp[][],dist[][];
	static int ans = 0;
	static PriorityQueue<Long> pq=  new PriorityQueue<Long>(Collections.reverseOrder());
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		new Thread(null ,new Runnable(){
            public void run(){
                try{
                    solve();
                } catch(Exception e){
                    e.printStackTrace();
                }
            }
        },"1",1<<26).start();
	}
	public static void solve() throws IOException{
		FasterScanner sc = new FasterScanner();
		BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
		int x = sc.nextInt();
		if(x==1) System.out.println(1);
		else if(x==2||x==4||x==5) System.out.println(3);
		else if(x==3) System.out.println(3);
		else{
			int y = (int)Math.ceil(Math.sqrt(2*x-1));
			if(y%2==0) y++;
			System.out.println(y);
		}
		log.close();
	}
	public static void dfs(int x,int y){
		b[x][y] = true;
		comp[x][y] = ans;
		amp2.add(new Pair(x,y));
		for(int i = 0;i<amp[x][y].size();i++){
			Pair p = amp[x][y].get(i);
			if(!b[p.u][p.v]){
				dfs(p.u,p.v);
			}
		}
	}
	static void findFactors(long[] primeDivisors, long[] multiplicity, long currentDivisor, long currentResult) {
	    if (currentDivisor == primeDivisors.length) {
	        hs.add(currentResult);
	        return;
	    }
	    for (int i = 0; i <= multiplicity[(int)currentDivisor]; ++i) {
	        findFactors(primeDivisors, multiplicity, currentDivisor + 1, currentResult);
	        currentResult *= primeDivisors[(int)currentDivisor];
	    }
	}
	static long modInverse(long a, long mOD2){
	            return  power(a, mOD2-2, mOD2);
	}
	static long power(long x, long y, long m)
	{
	    if (y == 0)
	        return 1;
	    long p = power(x, y/2, m) % m;
	    p = (p * p) % m;

	    return (y%2 == 0)? p : (x * p) % m;
	}
	static long power2(long x,char y[],long m){
		long ans = 1;
		int i = y.length-1;
		while(i>=0){
			if(y[i]=='1'){
				ans = (ans%m*x%m)%m;
				x = (x%m*x%m)%m;
			}
			else{
				x = (x%m*x%m)%m;
			}
			i--;
		}
		return ans;
	}
	static long d,x,y;
	public static void extendedEuclidian(long a, long b){
		if(b == 0) {
	        d = a;
	        x = 1;
	        y = 0;
	    }
	    else {
	        extendedEuclidian(b, a%b);
	        int temp = (int) x;
	        x = y;
	        y = temp - (a/b)*y;
	    }
	}

	public static long gcd(long n, long m){
		if(m!=0) return gcd(m,n%m);
		else return n;
	}

	static class Pair implements Comparable<Pair> {
		int u;
		int v;
		public Pair(){

		}
		public Pair(int u, int v) {
			this.u = u;
			this.v = v;
		}

		public int hashCode() {
			int hu = (int) (u ^ (u >>> 32));
			int hv = (int) (v ^ (v >>> 32));
			return 31*hu + hv;
		}

		public boolean equals(Object o) {
			Pair other = (Pair) o;
			return (u == other.u && v == other.v);
		}

		public int compareTo(Pair other) {
			return Long.compare(u, other.u) != 0 ? (Long.compare(u, other.u)) : (Long.compare(v, other.v));
		}

		public String toString() {
			return "[u=" + u + ", v=" + v + "]";
		}
	}
	public static class FasterScanner {
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = System.in.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public String nextString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

	    public int[] nextIntArray(int n) {
	        return nextIntArray(n, 0);
	    }

	    public int[] nextIntArray(int n, int off) {
	    	int[] arr = new int[n + off];
	    	for (int i = 0; i < n; i++) {
	    		arr[i + off] = nextInt();
	    	}
	    	return arr;
	    }

	    public long[] nextLongArray(int n) {
	    	return nextLongArray(n, 0);
	    }

		public long[] nextLongArray(int n, int off) {
		    long[] arr = new long[n + off];
		    for (int i = 0; i < n; i++) {
		        arr[i + off] = nextLong();
		    }
		    return arr;
		}

	    private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}
}

//package Round_127;

import java.util.Scanner;

public class c_beta {

	static long sum1(int n){
		long sum = n;
		n-=2;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	static long sum2(int n){
		n--;
		long sum = 0;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x = in.nextInt();
		int n = 1;
		if (x == 3 || x == 2){
			System.out.println(5);
			return;
		}
		while (sum1(n) < x && sum2(n) < x) n++;

		//n = (x / 4)*2  + (x % 4 == 1 || x % 4 == 2 ? 1 : x % 4 != 0 ? 5 : 1);
		System.out.println(n);
	}

}

import java.util.Scanner;

public class Main
{
    public static void main( String[] args )
    {
        Scanner in = new Scanner( System.in );
        int x = in.nextInt();
        if ( x == 5 || x == 4 ) System.out.println( 3 );
        else if ( x == 1 ) System.out.println( 1 );
        else
        {
        int current_max_of_1 = 3;
        int optimal_length = 5;
        for ( int i = 5; current_max_of_1 < x ; i += 2 )
        {
            current_max_of_1 = ( i / 2 + 1 ) * ( i / 2 + 1 ) + ( i / 2 ) * ( i / 2 );
            optimal_length = i;
        }
        System.out.println( optimal_length );
        }
    }
}

import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.regex.*;
/*
	  br = new BufferedReader(new FileReader("input.txt"));
	  pw = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
	  br = new BufferedReader(new InputStreamReader(System.in));
	  pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
 */

public class Main {
	private static BufferedReader br;
	private static StringTokenizer st;
	private static PrintWriter pw;

	static int[][][][] dp;
	static int[][] prefix;

	public static void main(String[] args) throws Exception {
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		//int qq = 1;
		int qq = Integer.MAX_VALUE;
		//int qq = readInt();
		for(int casenum = 1; casenum <= qq; casenum++)	{
			int k = readInt();
			int n = 3;
			while((n*n+1)/2 < k) n += 2;
			pw.println(n);
		}
		exitImmediately();
	}

	private static void exitImmediately() {
		pw.close();
		System.exit(0);
	}

	private static long readLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	private static double readDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	private static int readInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	private static String nextLine() throws IOException  {
		if(!br.ready()) {
			exitImmediately();
		}
		st = null;
		return br.readLine();
	}

	private static String nextToken() throws IOException  {
		while(st == null || !st.hasMoreTokens())  {
			if(!br.ready()) {
				exitImmediately();
			}
			st = new StringTokenizer(br.readLine().trim());
		}
		return st.nextToken();
	}
}

    import java.util.*;
    import java.io.*;
    import java.math.*;

    public class C {
        public static Scanner scan = new Scanner(System.in);
        public static boolean bg = true;

        public static void main(String[] args) throws Exception {
            TreeMap<Integer,Integer> odd = new TreeMap();
            int cur = 1;
            for (int i=1;i<=100;i+=2){
                odd.put(cur, i);
                cur+=(i+1)*2;
            }

            TreeMap<Integer,Integer> even = new TreeMap();
            for (int i=2;i<=100;i+=2){
                int k1 = i/4;
                int add1 = k1*2*(i/2);

                int k2 = (i-1)/4;
                int add2 = k2*2*(i/2);
                even.put(i*i/2, i);
            }
            //System.out.println(odd);
            //System.out.println(even);
            int k1 = Integer.parseInt(scan.next());
            int fin = odd.ceilingEntry(k1).getValue();

            int temp = even.ceilingEntry(k1).getValue();
            if (temp<fin) fin = temp;
            System.out.println(fin);
            System.exit(0);
        }
    }

import java.io.*;
import java.util.*;

public class C {
	static Scanner scan = new Scanner (System.in);
	static PrintStream out = System.out;

	public static void main (String[] args) {
		int x = scan.nextInt();
		int n = 1;
		if (x % 2 == 1) {
			while (n*n/2+1 < x) {
				n += 2;
			}
		} else {
			while (n*n/2 - 1 < x) {
				n += 2;
			}
		}
		out.println (n);
	}
}

//package Round_127;

import java.util.Scanner;

public class c_beta {

	static long sum1(int n){
		long sum = n;
		n-=2;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	static long sum2(int n){
		n--;
		long sum = 0;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x = in.nextInt();
		int n = 1;
		if (x == 2){
			System.out.println(3);
			return;
		}
		if (x == 3){
			System.out.println(5);
			return;
		}
		while (sum1(n) < x && sum2(n) < x) n++;

		//n = (x / 4)*2  + (x % 4 == 1 || x % 4 == 2 ? 1 : x % 4 != 0 ? 5 : 1);
		System.out.println(n);
	}

}

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.PriorityQueue;
import java.util.TreeMap;
import java.util.TreeSet;

public class Q21 {
	static long MOD = 1000000007;
	static TreeSet<Long> hs = new TreeSet<>();
	static ArrayList<Pair>[][] amp;
	static ArrayList<Pair> amp2;
	static boolean b[][];
	static int comp[][],dist[][];
	static int ans = 0;
	static PriorityQueue<Long> pq=  new PriorityQueue<Long>(Collections.reverseOrder());
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		new Thread(null ,new Runnable(){
            public void run(){
                try{
                    solve();
                } catch(Exception e){
                    e.printStackTrace();
                }
            }
        },"1",1<<26).start();
	}
	public static void solve() throws IOException{
		FasterScanner sc = new FasterScanner();
		BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
		int x = sc.nextInt();
		if(x==1) System.out.println(1);
		else if(x==2||x==4||x==5) System.out.println(3);
		else if(x==3) System.out.println(3);
		else{
			int y = (int)Math.ceil(Math.sqrt(2*x-1));
			if(y%2==0) y++;
			int c = ((y*y)+1)/2;
			System.out.println(c);
		}
		log.close();
	}
	public static void dfs(int x,int y){
		b[x][y] = true;
		comp[x][y] = ans;
		amp2.add(new Pair(x,y));
		for(int i = 0;i<amp[x][y].size();i++){
			Pair p = amp[x][y].get(i);
			if(!b[p.u][p.v]){
				dfs(p.u,p.v);
			}
		}
	}
	static void findFactors(long[] primeDivisors, long[] multiplicity, long currentDivisor, long currentResult) {
	    if (currentDivisor == primeDivisors.length) {
	        hs.add(currentResult);
	        return;
	    }
	    for (int i = 0; i <= multiplicity[(int)currentDivisor]; ++i) {
	        findFactors(primeDivisors, multiplicity, currentDivisor + 1, currentResult);
	        currentResult *= primeDivisors[(int)currentDivisor];
	    }
	}
	static long modInverse(long a, long mOD2){
	            return  power(a, mOD2-2, mOD2);
	}
	static long power(long x, long y, long m)
	{
	    if (y == 0)
	        return 1;
	    long p = power(x, y/2, m) % m;
	    p = (p * p) % m;

	    return (y%2 == 0)? p : (x * p) % m;
	}
	static long power2(long x,char y[],long m){
		long ans = 1;
		int i = y.length-1;
		while(i>=0){
			if(y[i]=='1'){
				ans = (ans%m*x%m)%m;
				x = (x%m*x%m)%m;
			}
			else{
				x = (x%m*x%m)%m;
			}
			i--;
		}
		return ans;
	}
	static long d,x,y;
	public static void extendedEuclidian(long a, long b){
		if(b == 0) {
	        d = a;
	        x = 1;
	        y = 0;
	    }
	    else {
	        extendedEuclidian(b, a%b);
	        int temp = (int) x;
	        x = y;
	        y = temp - (a/b)*y;
	    }
	}

	public static long gcd(long n, long m){
		if(m!=0) return gcd(m,n%m);
		else return n;
	}

	static class Pair implements Comparable<Pair> {
		int u;
		int v;
		public Pair(){

		}
		public Pair(int u, int v) {
			this.u = u;
			this.v = v;
		}

		public int hashCode() {
			int hu = (int) (u ^ (u >>> 32));
			int hv = (int) (v ^ (v >>> 32));
			return 31*hu + hv;
		}

		public boolean equals(Object o) {
			Pair other = (Pair) o;
			return (u == other.u && v == other.v);
		}

		public int compareTo(Pair other) {
			return Long.compare(u, other.u) != 0 ? (Long.compare(u, other.u)) : (Long.compare(v, other.v));
		}

		public String toString() {
			return "[u=" + u + ", v=" + v + "]";
		}
	}
	public static class FasterScanner {
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = System.in.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public String nextString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

	    public int[] nextIntArray(int n) {
	        return nextIntArray(n, 0);
	    }

	    public int[] nextIntArray(int n, int off) {
	    	int[] arr = new int[n + off];
	    	for (int i = 0; i < n; i++) {
	    		arr[i + off] = nextInt();
	    	}
	    	return arr;
	    }

	    public long[] nextLongArray(int n) {
	    	return nextLongArray(n, 0);
	    }

		public long[] nextLongArray(int n, int off) {
		    long[] arr = new long[n + off];
		    for (int i = 0; i < n; i++) {
		        arr[i + off] = nextLong();
		    }
		    return arr;
		}

	    private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}
}

// package Practice2.CF200;

import java.util.Scanner;

public class CF201A {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        if(n == 3){
            System.out.println(5);
        }else{
            int i = 0;
            while((i * i+1)/2 < n){
                i++;
            }
            System.out.println(i);
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class ClearSymmetry {

    static final int MAX = 250;

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);

        int x = in.nextInt();

        for (int i = 1; i < MAX; i += 2) {
            int maxHold = (i * i) / 2 + 1;
            if (maxHold >= x) {
                if (i == 3 && x < 4)
                    continue;
                System.out.println(i);
                break;
            }
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = new StringTokenizer("");
        }

        public String next() {
            try {
                while (!tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }

            return tokenizer.nextToken();
        }

        public String nextLine() {
            String line = null;
            try {
                tokenizer = new StringTokenizer("");
                line =  reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        boolean hasNext() {
            while (!tokenizer.hasMoreTokens()) {
                String line = nextLine();
                if (line == null) return false;
                tokenizer = new StringTokenizer(line);
            }
            return true;
        }
    }
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;

/**
 * 10
 *
 * Y4 B1 R3 G5 R5 W3 W5 W2 R1 Y1
 *
 *
 * @author pttrung
 */
public class A {

    public static int Mod;
    public static int min;

    public static void main(String[] args) throws FileNotFoundException, IOException {

        Scanner in = new Scanner();
        //  PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();
        int start = 1;

        int side = 1;
        int level = 1;
        while( start < n){
            start += 4*level;
            level++;
            side += 2;
        }
        out.println(side);
        out.close();
    }

    public static class Spell implements Comparable<Spell> {

        int index;
        long time;

        public Spell(int index, int time) {
            this.index = index;
            this.time = time;
        }

        @Override
        public int compareTo(Spell o) {
            return Long.compare(time, o.time);
        }
    }

    public static int[][] powSquareMatrix(int[][] A, long p) {
        int[][] unit = new int[A.length][A.length];
        for (int i = 0; i < unit.length; i++) {
            unit[i][i] = 1;
        }
        if (p == 0) {
            return unit;
        }
        int[][] val = powSquareMatrix(A, p / 2);
        if (p % 2 == 0) {
            return mulMatrix(val, val);
        } else {
            return mulMatrix(A, mulMatrix(val, val));
        }

    }

    public static int[][] mulMatrix(int[][] A, int[][] B) {
        int[][] result = new int[A.length][B[0].length];
        for (int i = 0; i < result.length; i++) {
            for (int j = 0; j < result[0].length; j++) {
                long temp = 0;
                for (int k = 0; k < A[0].length; k++) {

                    temp += ((long) A[i][k] * B[k][j] % Mod);
                    temp %= Mod;
                }
                temp %= Mod;
                result[i][j] = (int) temp;
            }
        }

        return result;
    }

    static double dist(Point a, Point b) {
        long total = (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
        return Math.sqrt(total);
    }

    static class Point implements Comparable<Point> {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;

        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x) {
                return x - o.x;
            }
            return y - o.y;
        }
    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        void update(int index, int val) {
            // System.out.println("UPDATE INDEX " + index);
            while (index < data.length) {
                data[index] += val;
                index += index & (-index);

                //    System.out.println("NEXT " +index);
            }
        }

        int get(int index) {
            //  System.out.println("GET INDEX " + index);
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= index & (-index);
                // System.out.println("BACK " + index);
            }
            return result;
        }
    }

    static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        } else {
            return gcd(b, a % b);
        }
    }

    static int pow(int a, int b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        int val = pow(a, b / 2);
        if (b % 2 == 0) {

            return val * val;
        } else {
            return val * val * a;
        }
    }

//    static Point intersect(Point a, Point b, Point c) {
//        double D = cross(a, b);
//        if (D != 0) {
//            return new Point(cross(c, b) / D, cross(a, c) / D);
//        }
//        return null;
//    }
//
//    static Point convert(Point a, double angle) {
//        double x = a.x * cos(angle) - a.y * sin(angle);
//        double y = a.x * sin(angle) + a.y * cos(angle);
//        return new Point(x, y);
//    }
//    static Point minus(Point a, Point b) {
//        return new Point(a.x - b.x, a.y - b.y);
//    }
//
//    static Point add(Point a, Point b) {
//        return new Point(a.x + b.x, a.y + b.y);
//    }
//
//    static double cross(Point a, Point b) {
//        return a.x * b.y - a.y * b.x;
//
//
//    }
//
//    static class Point {
//
//        int x, y;
//
//        Point(int x, int y) {
//            this.x = x;
//            this.y = y;
//        }
//
//        @Override
//        public String toString() {
//            return "Point: " + x + " " + y;
//        }
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            //System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //br = new BufferedReader(new FileReader(new File("A-large-practice.in")));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main1 {

	static boolean valid(int target,int four,int two,int one)
	{
		while(target>=4 && four-->0)target-=4;
		while(target>=2 && two-->0)target-=2;
		if(target>0 && one!=0)target--;
		return target==0;
	}

	static boolean valid(int target,int n)
	{
		n/=2;
		if(n%2==0)
			return valid(target, n*n/2, n, 1);
		else
			return valid(target, (square(n/2+1)+square(n/2)), (n/2)<<1 , 1) || valid(target, square((n/2)*(n/2+1)), (n/2+1)<<1,0);
	}

	static int square(int n){return n*n;}

	public static void main(String[] args) throws Throwable {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ans  = 0;
		if(n==1)
			ans = 1;
		else if(n<6&&n!=3)
			ans = 3;
		else if(n==3)ans = 5;
		else
			for(int i = 5;ans==0;i+=2)
				if(valid(n, i))ans =i;

		System.out.println(ans);
	}

 	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public int[] nexIntArray() throws Throwable {
			st = new StringTokenizer(br.readLine());
			int[] a = new int[st.countTokens()];
			for (int i = 0; i < a.length; i++)
				a[i] = nextInt();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}

}

/**
 * Alipay.com Inc. Copyright (c) 2004-2020 All Rights Reserved.
 */

import java.util.Scanner;

/**
 *
 * @author linwanying
 * @version $Id: A201.java, v 0.1 2020年06月14日 4:32 PM linwanying Exp $
 */
public class A201 {
    public static void main(String[] args) {
        new A201().run();
    }

    private void run() {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();

        int r2 = x*2 -1;

        int i = 1;
        while(i*i < r2) {
            i++;
        }

        if (x == 3) {
            System.out.println(5);
        } else {
            System.out.println(i);
        }

    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) throws Exception
    {

        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        for (int n = 1 ; ; n += 2){
            if (((n >> 1) & 1) == 0){
                int can = 1 + ((((n >> 1) + 1) * (n >> 1 >> 1) + ((n >> 1)) * (n >> 1 >> 1)) << 1);
                can += ((n >> 1));
                if (can >= x) {
                    System.out.println(n);
                    break;
                }

            }
            else {
                int can = 1 + ((((n >> 1) + 1) * (n >> 1 >> 1) + (((n >> 1)) * ((n >> 1 >> 1) + 1))) << 1);
                can += ((n >> 1) + 1);
                if (can >= x) {
                    System.out.println(n);
                    break;
                }
            }

        }
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author cunbidun
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CClearSymmetry solver = new CClearSymmetry();
        solver.solve(1, in, out);
        out.close();
    }

    static class CClearSymmetry {
        private InputReader in;
        private PrintWriter out;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.in = in;
            this.out = out;
            int n = in.nextInt();
            for (int i = 1; i <= 3 * n; i += 2) {
                if (i * i / 2 + 1 >= n) {
                    out.println(i);
                    return;
                }
            }
        }

    }

    static class InputReader extends InputStream {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        private static boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}

import java.util.Scanner;

public class Matrix {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int lowermax=1;
        int uppermax=1;
        int side=-1;
       do {
           side+=2;
            lowermax= uppermax;
            uppermax= (((side/2)+1)*((side/2)+1)) + ((side/2)*(side/2));

        } while (num >= uppermax );

 System.out.println(side);
    }

}

import java.util.*;
import java.io.*;

public class Main implements Runnable {

	public void solve() throws IOException {
		int N = nextInt();
                if(N == 1) out.println(1);
                else if(N == 2) out.println(3);
                else if(N == 3) out.println(5);
                else{
                    int i = 0;
                    for(i = 1; ; i += 2) if(get(i) > N) break;
                    out.println(i);
                }
	}

        private int get(int x){
            return x * (x + 1) / 2;
        }

	//-----------------------------------------------------------
	public static void main(String[] args) {
		new Main().run();
	}

        public void debug(Object... arr){
            System.out.println(Arrays.deepToString(arr));
        }

        public void print1Int(int[] a){
                for(int i = 0; i < a.length; i++)
                        System.out.print(a[i] + " ");
                System.out.println();
        }

        public void print2Int(int[][] a){
                for(int i = 0; i < a.length; i++){
                        for(int j = 0; j < a[0].length; j++){
                                System.out.print(a[i][j] + " ");
                        }
                        System.out.println();
                }
        }

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
                        out = new PrintWriter(System.out);
			tok = null;
			solve();
			in.close();
                        out.close();
		} catch (IOException e) {
			System.exit(0);
		}
	}

	public String nextToken() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
        PrintWriter out;
	BufferedReader in;
	StringTokenizer tok;
}

import java.io.* ;
import java.util.*;

import static java.lang.Math.* ;
import static java.util.Arrays.* ;

public class A {

	public static void main(String[] args) throws IOException {

		new A().solveProblem();

		out.close();
	}

	static Input in = new Input() ;
	static PrintStream out = new PrintStream(new BufferedOutputStream(System.out));
	static Output out2 = new Output(out) ;

	public void solveProblem() throws IOException {

		int x = in.nextInt() ;

		for( int i = 1 ; i <= 100 ; i+=2 ){
			int tot = ((i+1) / 2 ) * ((i+1) / 2 ) ;
			tot += (i)/2 * (i)/2 ;
			if( tot >= x ){
				out.println(i) ;
				return ;
			}
		}

	}

	static void p( Object ...p){
		System.out.println(Arrays.deepToString(p));
	}

	static class Input {

		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tokens ;

		public int nextInt(){
			return Integer.parseInt(next()) ;
		}

		public int[] nextInt(int n ){
			int[] res = new int[n] ;
			for( int i = 0 ; i < n ; i++ )
				res[i] = nextInt() ;
			return res ;
		}

		public long nextLong(){
			return Long.parseLong(next()) ;
		}

		public long[] nextLong(int n ){
			long[] res = new long[n] ;
			for( int i = 0 ; i < n ; i++ )
				res[i] = nextLong() ;
			return res ;
		}

		public double nextDouble(){
			return Double.parseDouble(next()) ;
		}

		public String next(){

			try{
				while( tokens == null || !tokens.hasMoreTokens() )
					tokens = new StringTokenizer(buf.readLine()) ;
			}catch( Exception e ){
				e.printStackTrace() ;
			}

			return tokens.nextToken() ;
		}

	}

	static class Output {

		PrintStream out ;

		public Output(PrintStream out) {
			this.out = out;
		}

		void wr( int[] rij ){
			for( int i = 0 ; i < rij.length - 1 ; i++ )
				out.print(rij[i] + " ") ;
			out.println(rij[rij.length-1]);
		}

		void wr( long[] rij ){
			for( int i = 0 ; i < rij.length - 1 ; i++ )
				out.print(rij[i] + " ") ;
			out.println(rij[rij.length-1]);
		}

		void wr( char[] rij){
			out.println(new String(rij)) ;
		}

	}

}

import java.util.*;

public class Main {

  public static void main(String args[]) {
    (new Main()).solve();
  }

  void solve() {

    Scanner cin = new Scanner(System.in);

    while( cin.hasNextInt() ) {

      int n = cin.nextInt();
      // odd only;
      for(int i=1; i<1000; i+=2) {
        int can = i * i / 2 + 1;
        if( n <= can ) {
          System.out.println(i);
          break;
        }
      }

    }

  }

}

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        InputStream inputStream=System.in;
        /*
        try{
            inputStream=new FileInputStream("input.txt");
        } catch (IOException e){throw new RuntimeException(e);}
        //*/
        OutputStream outputStream=System.out;
        InputReader in=new InputReader(inputStream);
        PrintWriter out=new PrintWriter(outputStream);
        Task solver=new Task();
        solver.run(in,out);
        out.close();
    }

}

class Task{
    public void run(InputReader in, PrintWriter out){
        int x=in.nextInt(),n,y,s;
        n=x/4;
        //if (x==2){out.println(2); return;}
        //if (x==3){out.println(5); return;}
        for (int i=0;i<=x*2+1;i++){
            y=(i*i+1)/2;
            s=i/2;
            if (x%2==1&&i%2==1) s--;
            if (x%4>1) s--;
            if (s<0) continue;
            y+=s;
            if (y>=n) {out.println(i*2+1); return;}
        }
    }
}

class InputReader{
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream){
        reader=new BufferedReader(new InputStreamReader(stream));
        tokenizer=null;
    }
    public String next(){
        while (tokenizer==null||!tokenizer.hasMoreTokens()){
            try{
                tokenizer=new StringTokenizer(reader.readLine());
            } catch (IOException e){
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }
    public int nextInt(){
        return Integer.parseInt(next());
    }
}

import java.io.*;
import java.util.*;

public class Main {
  BufferedReader br;
  int x, n;

  public void go() throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    x = Integer.parseInt(br.readLine());

    if (x == 1) {
      System.out.println("1");
      return;
    }

    for (n = 1; n <= 1000; n += 2)
      if (n * n / 2 + 1 >= x)
        break;

    System.out.println(n);
  }

  public static void main(String[] args) throws Exception {
    new Main().go();
  }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class A201 {

	public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(System.in);
		int x = in.nextInt();
		int n = 1;
		while(true)
		{
			int val;
			if(n%2!=0)
				val = (n/2+1) * (n/2+1) + (n/2) * (n/2);
			else
				val = n;
			if(val >= x)
				break;
			n++;
		}
		System.out.println(n);

	}
	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
 * Created by Tejas on 17-07-2018.
 */
public class Main  {

    public static void main(String[]args)throws IOException{
        BufferedReader bufferedReader=new BufferedReader(new InputStreamReader(System.in));
        int x=Integer.parseInt(bufferedReader.readLine());
        System.out.println(solve(x));
    }

    private static int solve(int x) {
        if(x==2)
            return 3;
        if(x==3 || x==6 ||x==7 || x==11)
            return 5;
        int k=x/4;
        return  2*k+1;
    }
}

import java.util.*;
import java.io.*;

public class Main
{
    public static void main(String arg[])
    {
        new Main();
    }
    public Main()
    {
        new TaskA();
    }
}

class TaskA
{
    public TaskA()
    {
        Scanner cin=new Scanner(new BufferedInputStream(System.in));
        int a[]=new int[100+2];
        for (int n=1;n<=100;n++)
            if (n%2==0) a[n]=(((n/2-1)*(n/2-1)+1)/2*4);
            else a[n]=((n*n+1)/2);
        int n=cin.nextInt();
        for (int i=1;i<=100;i++)
            if (a[i]>=n)
            {
                System.out.println(i);
                break;
            }
        cin.close();
    }
}

import java.util.Scanner;

public class Matrix {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int lowermax=1;
        int uppermax=1;
        int side=-1;
       do {
           side+=2;
            lowermax= uppermax;
            uppermax= (((side/2)+1)*((side/2)+1)) + ((side/2)*(side/2));

        } while ( num > uppermax );
        if  (num!=0)
 {System.out.println(side);}
        else
            System.out.println(0);
    }

}

import java.io.BufferedInputStream;
import java.util.Scanner;

/**
 * User: khuongnd
 * Date: 6/12/12
 * Time: 9:48 CH
 */
public class C {
	private static int BUFFER_SIZE = 16 * 1024 * 1024;
	private static Long oo = Long.MAX_VALUE / 2;
	private int N, K, x;
	private int result;
	private boolean F[][];

	public void read(Scanner reader) {
		x = reader.nextInt();
	}

	public void process() {
		result = 1000;
		for (int d = 0; d <= x; d++)
			if (check(d, x)) {
				result = d;
				return;
			}
	}

	private boolean check(int n, int x) {
		if (n % 2 == 0) {
			return false;
		} else {
			int half = n / 2 + 1;
			int center = 0;
			if (x % 2 == 1) {
				center = 1;
			}
			int over = 4 * ((half * half + center) / 2), xmax, t;
			t = (half - center) / 2;
			xmax = over - 2 * t - 3 * center;
			//System.out.println(n + " " + center + " " + xmax + " " + over);
			return xmax >= x;
		}
	}

	public void print() {
		System.out.println(result);
	}

	public static void main(String args[]) {
		try {
			Scanner reader = new Scanner(new BufferedInputStream(System.in, BUFFER_SIZE));
			C c = new C();
			c.read(reader);
			c.process();
			c.print();
			reader.close();
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

import java.util.*;
import java.lang.*;

/**
 *
 * @author Bryan AW
 */
public class Codeforces {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args){

        //Clear Symmetry

        Scanner sc=new Scanner(System.in);

        int x=sc.nextInt();

        int n=2*(int)Math.ceil(Math.sqrt(x))-1;

        System.out.println(n);

    }

}

import java.util.*;
import java.io.*;
public class a {
    static long mod = 1000000007;
    public static void main(String[] args) throws IOException {
        // Scanner input = new Scanner(new File("input.txt"));
        // PrintWriter out = new PrintWriter(new File("output.txt"));
        input.init(System.in);
        PrintWriter out = new PrintWriter((System.out));

        int n = input.nextInt(),res = 0;
        int[] nums = new int[]{1,2,5,8,13,18,25,32,41,50,61,72,85,98,100};
        for(int i = nums.length-1; i>=0; i--) if(n<=nums[i]) res = i+1;
        out.println(res);

        out.close();
    }
    static long pow(long x, long p) {
        if (p == 0)
            return 1;
        if ((p & 1) > 0) {
            return (x * pow(x, p - 1)) % mod;
        }
        long sqrt = pow(x, p / 2);
        return (sqrt * sqrt) % mod;
    }

    static class input {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

        /** call this method to initialize reader for InputStream */
        static void init(InputStream input) {
            reader = new BufferedReader(new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }

        /** get next word */
        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                // TODO add check for eof if necessary
                tokenizer = new StringTokenizer(reader.readLine());
            }
            return tokenizer.nextToken();
        }

        static int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        static long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        static String nextLine() throws IOException {
            return reader.readLine();
        }
    }
    public static boolean[] sieve(int n)
    {
        boolean[] res = new boolean[n+1];
        for(int i = 2; i<=n; i++) res[i] = true;
        for(int i = 2; i <= Math.sqrt(n); i++)
            if(res[i])
                for(long j = (long)i*i; j<=n; j+=i)
                    res[(int) j] = false;
        return res;
    }
    //GCD - O(log(max(p, q)))
    //res[0] is gcd of p and q
    //res[1] and res[2] are values used in extended Euclidean algorithm for inverse mod
    public static long[] gcd(long p, long q)
    {
        if(q==0)
            return new long[] {p, 1, 0};
        long[] vals = gcd(q, p%q);
        return new long[] {vals[0], vals[2], vals[1] - (p/q)*vals[2]};
    }
    //Inverse Mod - O(log(mod))
    //Returns A s.t. x*A = 1(MOD mod)
    public static long invmod(long x)
    {
        long[] vals = gcd(x, mod);
        if(vals[0]>1)
            return -1;
        if(vals[1]>0)
            return vals[1];
        return mod + vals[1];
    }
}

//package Round_127;

import java.util.Scanner;

public class c_beta {

	static long sum1(int n){
		long sum = n;
		n-=2;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	static long sum2(int n){
		n--;
		long sum = 0;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x = in.nextInt();
		int n = 1;
		//while (sum1(n) < x && sum2(n) < x) n++;
		n = (x / 4)*2  + (x % 4 == 1 || x % 4 == 2 ? 1 : x % 4 != 0 ? 5 : 1);
		System.out.println(n);
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.StringTokenizer;

public class A {

	private void solve() throws IOException {
		int x = nextInt();
		for (int n = 1; ; n++) {
			int p = (n * n + 1) / 2;
			if (p >= x) {
				println(n);
				return;
			}
		}
	}

	private String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}

	private int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	private double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	private long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	private void print(Object o) {
		writer.print(o);
	}

	private void println(Object o) {
		writer.println(o);
	}

	private void printf(String format, Object... o) {
		writer.printf(format, o);
	}

	public static void main(String[] args) {
		long time = System.currentTimeMillis();
		Locale.setDefault(Locale.US);
		new A().run();
		System.err.printf("%.3f\n", 1e-3 * (System.currentTimeMillis() - time));
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter writer;

	private void run() {
		try {
			reader = new BufferedReader(new InputStreamReader(System.in));
			writer = new PrintWriter(System.out);
			solve();
			reader.close();
			writer.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(13);
		}
	}
}

import java.util.*;
public class Main {
    final int INF = 1 << 24;
    class C{
        int step,sum,preb;

        public C(int step, int sum, int preb) {
            this.step = step;this.sum = sum;this.preb = preb;
        }
    }

    private void doit(){
        Scanner sc = new Scanner (System.in);
        while(sc.hasNext()){
            int x = sc.nextInt();
            LinkedList<C> open = new LinkedList<C>();
            open.add(new C(2,1,1));
            open.add(new C(2,0,0));
            int ans = INF;
            while(! open.isEmpty()){
                C now = open.removeFirst();
                //System.out.println("sum= " + now.sum + " step= " + now.step);

                if(now.sum == x){
                    ans = Math.min(ans, now.step -1);
                    continue;
                }
                if(now.step == 10){
                    continue;
                }
                open.add(new C(now.step+1, now.sum, 0));
                for(int i=1; i <= now.step;i++){
                    int nowvalue = 1 << i;
                    int nextsum = now.sum + nowvalue;
                    //System.out.println(nextsum + " " + nowvalue);

                    if(nextsum > x){
                        break;
                    }
                    open.add(new C(now.step+1, nextsum, nowvalue));
                }
            }
            System.out.println(ans * 2 -1);
        }
    }

    public static void main(String[] args) {
        Main obj = new Main();
        obj.doit();
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class ClearSymmetry {

    static final int MAX = 250;

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);

        int x = in.nextInt();

        for (int i = 1; i < MAX; i += 2) {
            int maxHold = (i * i) / 2 + 1;
            if (maxHold >= x) {
                if (i == 3 && x < 4)
                    continue;
                System.out.println(i);
                break;
            }
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = new StringTokenizer("");
        }

        public String next() {
            try {
                while (!tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }

            return tokenizer.nextToken();
        }

        public String nextLine() {
            String line = null;
            try {
                tokenizer = new StringTokenizer("");
                line =  reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        boolean hasNext() {
            while (!tokenizer.hasMoreTokens()) {
                String line = nextLine();
                if (line == null) return false;
                tokenizer = new StringTokenizer(line);
            }
            return true;
        }
    }
}

//package clearsymmetry;
import java.io.DataInputStream;
import java.io.PrintWriter;
import java.io.FileInputStream;
import java.io.IOException;

public class ClearSymmetry
{
	static class Reader
	{
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader()
		{
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException
		{
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException
		{
			byte[] buf = new byte[201]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1)
			{
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException
		{
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do
			{
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException
		{
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException
		{
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');

			if (c == '.')
			{
				while ((c = read()) >= '0' && c <= '9')
				{
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException
		{
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException
		{
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException
		{
			if (din == null)
				return;
			din.close();
		}
	}

        public static void main(String[] args) throws IOException
	{
		Reader s=new Reader();PrintWriter pw=new PrintWriter(System.out);
                int x=s.nextInt(),i;
                int a=0,b=0,c=0;
                if(x%2!=0)c=1;
                if((x-c)%4!=0)b=1;
                a=(x-c)/4;
                int ans=0;
                for(i=0;;i++){
                  if(2*i*(i+1)>=4*a)break;
                }if(b==0||2*i*(i+1)>4*a)ans=2*i+1;
                else ans=2*(i+1)+1;
                pw.write(ans+"");
		pw.flush();pw.close();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br1 = new BufferedReader(
				new InputStreamReader(System.in));
		int sharpness = Integer.parseInt(br1.readLine());
		if (sharpness == 1) {
			System.out.println(1);
			return;
		} else if (sharpness == 2) {
			System.out.println(3);
			return;
		} else if (sharpness == 3) {
			System.out.println(5);
			return;
		} else if (sharpness == 4) {
			System.out.println(3);
			return;
		} else if (sharpness == 5) {
			System.out.println(3);
			return;
		} else {
			int max = 2 * sharpness - 1;
			int result = (int) Math.ceil(Math.sqrt(max));
			System.out.println(result);
		}

	}
}

import java.util.*;
import java.io.*;

public class Solution {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int x = in.nextInt();

        int capacity = 0;
        int n = 0;
        while (capacity < x) {
            capacity += 1 + 2 * (n / 2);
            n++;
        }

        System.out.println(n);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg) {
        new Solution().run();
    }
}

import java.io.*;
import java.util.*;

public class C {
	static Scanner scan = new Scanner (System.in);
	static PrintStream out = System.out;

	public static void main (String[] args) {
		int x = scan.nextInt();
		int n = 1;
		while (n*n/2+1 < x) {
			n += 2;
		}
		out.println (n);
	}
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author AlexFetisov
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n == 1) {
            out.println(1);
            return;
        }
        if (n == 2) {
            out.println(3);
            return;
        }
        if (n == 3) {
            out.println(5);
            return;
        }

        for (int m = 1; ; m += 2) {
            if (check(m, n)) {
                out.println(m);
                return;
            }
        }
    }

    private boolean check(int size, int n) {
        int max = (size / 2) * size + (size / 2);
        if (n <= max) return true;
        return false;
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer stt;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String nextLine() {
        try {
            return reader.readLine().trim();
        } catch (IOException e) {
            return null;
        }
    }

    public String nextString() {
        while (stt == null || !stt.hasMoreTokens()) {
            stt = new StringTokenizer(nextLine());
        }
        return stt.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

}

//package Round_127;

import java.util.Scanner;

public class c_beta {

	static long sum1(int n){
		long sum = n;
		n-=2;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	static long sum2(int n){
		n--;
		long sum = 0;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x = in.nextInt();
		int n = 1;
		//while (sum1(n) < x && sum2(n) < x) n++;
		n = (x / 4)*2  + (x % 4 == 1 || x % 4 == 2 ? 1 : x % 4 != 0 ? 2 : 1);
		System.out.println(n);
	}

}

import java.util.Scanner;

public class Matrix {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int lowermax=1;
        int uppermax=1;
        int side=-1;
       do {
           side+=2;
            lowermax= uppermax;
            uppermax= (((side/2)+1)*((side/2)+1)) + ((side/2)*(side/2));

        } while (!(lowermax <= num && num <= uppermax ));

 System.out.println(side);
    }

}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class P202C {

    static boolean multipleIndependent = false;

    void run() {
        int n = in.nextInt();
        System.out.println(n / 4 * 2 + 1);
    }

    /* -----: Template :----- */
    static InputReader in = new InputReader(System.in);
    static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) {
        int q = multipleIndependent ? in.nextInt() : 1;
        while (q-- > 0) {
            new P202C().run();
        }
        out.flush();
        out.close();
    }

    static class InputReader {

        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            int bufferSize = 32 * 1024;
            reader = new BufferedReader(new InputStreamReader(stream), bufferSize);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() {
            if (true) {
                throw new RuntimeException("nextLine: not tested");
            }
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            StringBuilder sb = new StringBuilder();
            return tokenizer.nextToken("\n");
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }

        public int[][] nextIntMap(int n, int m) {
            int[][] map = new int[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = nextIntArray(m);
            }
            return map;
        }

        public long[][] nextLongMap(int n, int m) {
            long[][] map = new long[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = nextLongArray(m);
            }
            return map;
        }

        public char[][] nextCharMap(int n) {
            char[][] map = new char[n][];
            for (int i = 0; i < n; i++) {
                map[i] = next().toCharArray();
            }
            return map;
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class A {

    String ans = "";
    String inp;

    public static void main(String[] args) throws IOException {
        Reader.init(System.in);
        new A();
    }
    A() throws IOException {
        Reader.init(System.in);
        solve();
    }

    void solve() throws IOException {

        int x = Reader.nextInt();
        int n = 1;
        if(x == 3){System.out.println(3); return;}
        while(true){
            int ones = (n/2)*(n/2) + ((n+1)/2)*((n+1)/2);
            if(ones >= x){System.out.println(n);return;}
            n+=2;
        }

    }

}

class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;
    /** call this method to initialize reader for InputStream */

    static void init(InputStream input) {
        reader = new BufferedReader(new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");

    }

    static String nextToken() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {

                tokenizer = new StringTokenizer(reader.readLine());

            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    static String next() throws IOException {

        while ( ! tokenizer.hasMoreTokens() ) {

            tokenizer = new StringTokenizer(

                    reader.readLine() );

        }
        return tokenizer.nextToken();

    }

    static int nextInt() throws IOException {

        return Integer.parseInt( next() );

    }

    static double nextDouble() throws IOException {

        return Double.parseDouble( next() );

    }

    static long nextLong() {

        return Long.parseLong(nextToken());
    }
}

	import java.io.*;
import java.util.*;

	public class CODEFORCES {
		private InputStream is;
		private PrintWriter out;
		int time = 0, val[][], dp[][], DP[], start[], end[], dist[],  black[], MOD = (int)(1e9+7), arr[], weight[][], x[], y[], parent[];
		int MAX = 800000, N, K;
		long red[];
		ArrayList<Integer>[] amp;
		//boolean b[], boo[][];
		Pair prr[];
		HashSet<Integer> hs = new HashSet<>();
		long Dp[][][][] = new long[110][110][12][12];
		void soln() {
			is = System.in;
			out = new PrintWriter(System.out);
			long s = System.currentTimeMillis();
			solve();
			//out.close();
			out.flush();
			//tr(System.currentTimeMillis() - s + "ms");
		}
		public static void main(String[] args) throws Exception {
			new Thread(null, new Runnable() {
			public void run() {
				try {

			//new CODEFORCES().soln();
			} catch (Exception e) {
					System.out.println(e);
				}
			}
		}, "1", 1 << 26).start();
			new CODEFORCES().soln();
		}
		int a,b;
		void solve() {
			int x = ni();
			int arr[] = new int[100];
			arr[1] = 1; arr[2]  =2;
			for(int i = 3;i<100;i++){
				int sum = 0;
				for(int j = i%2;j<i;j+=2)
				sum += j;
				arr[i] = 2*sum+i;
			}
			for(int i = 1;i<100;i++){
				if(arr[i]>=x){
					System.out.println(i+(1-i%2));
					break;
				}
			}
			//System.out.println(arr[5]+" "+arr[99]);
		}
		boolean check(int ans){
			while(ans>0){
				int c = ans%10;
				if(!(c==a||c==b)) return false;
				ans/=10;
			}
			return true;
		}
		long npr(long[] power, int n,int r){
			if(r>n) return 0;
			return (((power[n]*power(power[r], MOD-2, MOD))%MOD)*power(power[n-r], MOD-2, MOD))%MOD;
		}

		class Pair implements Comparable<Pair>{
			int u, v, i;
			Pair(int u, int v){
				this.u = u;
				this.v = v;
			}
			Pair(int u, int v, int i){
				this.u = u;
				this.v = v;
				this.i = i;
			}
			public int hashCode() {
				return Objects.hash();
			}
			/*public boolean equals(Object o) {
				Pair other = (Pair) o;
				return ((u == other.u && v == other.v) || (v == other.u && u == other.v));
			}*/
			public int compareTo(Pair other) {
				//return Integer.compare(val, other.val);
				return Long.compare(u, other.u) != 0 ? (Long.compare(u, other.u)) : (Long.compare(v,other.v));
			}
			public String toString(){
				return this.u +" " + this.v;
			}
		}
		int max(int a, int b){
			if(a>b) return a;
			return b;
		}

		void buildGraph(int n){
			for(int i = 0; i<n ;i++){
				int x1 = ni() -1, y1 = ni()-1;
				amp[x1].add(y1);
				amp[y1].add(x1);
				x[i] = x1; y[i] = y1;
			}
		}
		long modInverse(long a, long mOD2){
	        return  power(a, mOD2-2, mOD2);
		}
		long power(long x, long y, long m)
		{
			if (y == 0)
	    return 1;
		long p = power(x, y/2, m) % m;
		p = (p * p) % m;

		return (y%2 == 0)? p : (x * p) % m;
		}
		public long gcd(long a, long b){
			if(b==0) return a;
			return gcd(b,a%b);
		}
		static class ST1{
			int arr[], st[], size;
			ST1(int a[]){
				arr = a.clone();
				size = 10*arr.length;
				st = new int[size];
				build(0,arr.length-1,1);
			}
			void build(int ss, int se, int si){
				if(ss==se){
					st[si] = arr[ss];
					return;
				}
				int mid = (ss+se)/2;
				int val = 2*si;
				build(ss,mid,val); build(mid+1,se,val+1);
				st[si] = Math.min(st[val], st[val+1]);
			}
			int get(int ss, int se, int l, int r, int si){
				if(l>se || r<ss || l>r) return Integer.MAX_VALUE;
				if(l<=ss && r>=se) return st[si];
				int mid = (ss+se)/2;
				int val = 2*si;
				return Math.min(get(ss,mid,l,r,val), get(mid+1,se,l,r,val+1));
			}
		}
		static class ST{
			int arr[],lazy[],n;
			ST(int a){
				n = a;
				arr = new int[10*n];
				lazy = new int[10*n];
			}
			void up(int l,int r,int val){
				update(0,n-1,0,l,r,val);
			}
			void update(int l,int r,int c,int x,int y,int val){
				if(lazy[c]!=0){
					lazy[2*c+1]+=lazy[c];
					lazy[2*c+2]+=lazy[c];
					if(l==r)
						arr[c]+=lazy[c];
					lazy[c] = 0;
				}
				if(l>r||x>y||l>y||x>r)
					return;
				if(x<=l&&y>=r){
					lazy[c]+=val;
					return ;
				}
				int mid = l+r>>1;
				update(l,mid,2*c+1,x,y,val);
				update(mid+1,r,2*c+2,x,y,val);
				arr[c] = Math.max(arr[2*c+1], arr[2*c+2]);
			}
			int an(int ind){
				return ans(0,n-1,0,ind);
			}
			int ans(int l,int r,int c,int ind){
				if(lazy[c]!=0){
					lazy[2*c+1]+=lazy[c];
					lazy[2*c+2]+=lazy[c];
					if(l==r)
						arr[c]+=lazy[c];
					lazy[c] = 0;
				}
				if(l==r)
					return arr[c];
				int mid = l+r>>1;
				if(mid>=ind)
					return ans(l,mid,2*c+1,ind);
				return ans(mid+1,r,2*c+2,ind);
			}
		}
		public static int[] shuffle(int[] a, Random gen){
			for(int i = 0, n = a.length;i < n;i++)
			{
				int ind = gen.nextInt(n-i)+i;
				int d = a[i];
				a[i] = a[ind];
				a[ind] = d;
			}
		return a;
		}
		long power(long x, long y, int mod){
			long ans = 1;
			while(y>0){
				if(y%2==0){
					x = (x*x)%mod;
					y/=2;
				}
				else{
					ans = (x*ans)%mod;
					y--;
				}
			}
			return ans;
		}

		// To Get Input
		// Some Buffer Methods
		private byte[] inbuf = new byte[1024];
		public int lenbuf = 0, ptrbuf = 0;

		private int readByte() {
			if (lenbuf == -1)
				throw new InputMismatchException();
			if (ptrbuf >= lenbuf) {
				ptrbuf = 0;
				try {
					lenbuf = is.read(inbuf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (lenbuf <= 0)
					return -1;
			}
			return inbuf[ptrbuf++];
		}

		private boolean isSpaceChar(int c) {
			return !(c >= 33 && c <= 126);
		}

		private int skip() {
			int b;
			while ((b = readByte()) != -1 && isSpaceChar(b))
				;
			return b;
		}

		private double nd() {
			return Double.parseDouble(ns());
		}

		private char nc() {
			return (char) skip();
		}
		private String ns() {
			int b = skip();
			StringBuilder sb = new StringBuilder();
			while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '
										// ')
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}

		private char[] ns(int n) {
			char[] buf = new char[n];
			int b = skip(), p = 0;
			while (p < n && !(isSpaceChar(b))) {
				buf[p++] = (char) b;
				b = readByte();
			}
			return n == p ? buf : Arrays.copyOf(buf, p);
		}

		private char[][] nm(int n, int m) {
			char[][] map = new char[n][];
			for (int i = 0; i < n; i++)
				map[i] = ns(m);
			return map;
		}

		private int[] na(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = ni();
			return a;
		}

		private int ni() {
			int num = 0, b;
			boolean minus = false;
			while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
				;
			if (b == '-') {
				minus = true;
				b = readByte();
			}

			while (true) {
				if (b >= '0' && b <= '9') {
					num = num * 10 + (b - '0');
				} else {
					return minus ? -num : num;
				}
				b = readByte();
			}
		}

		private long nl() {
			long num = 0;
			int b;
			boolean minus = false;
			while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
				;
			if (b == '-') {
				minus = true;
				b = readByte();
			}

			while (true) {
				if (b >= '0' && b <= '9') {
					num = num * 10 + (b - '0');
				} else {
					return minus ? -num : num;
				}
				b = readByte();
			}
		}

		private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

		private void tr(Object... o) {
			if (!oj)
				System.out.println(Arrays.deepToString(o));
		}
	}

import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

	public void solve () throws Exception {
		int x = nextInt();

		int ans [] = new int [505];

		ans [4] = 4;

		for (int i = 6, j = 2; i <= 500; i += 2, j++) {
			ans [i] = ans [i - 2] + j * 4;
		}

		ans [1] = 1;

		for (int i = 3, j = 1; i <= 500; i += 2, j++) {
			ans [i] = ans [i - 2] + j * 4;
		}

		if (x % 4 == 0 || (x - 1) % 4 == 0) {

			if (x % 2 != 0) {
				for (int i = 1; i <= 500; i += 2) {
					if (ans [i] >= x) {
						out.println(i);
						break;
					}
				}
			} else {
				for (int i = 1; i <= 500; i++) {
					if (ans [i] >= x) {
						out.println(i);
						break;
					}
				}
			}

		} else {
			boolean find = false;
			global:
			for (int i = 3; i <= 500; i += 2) {
				ans [i] --;
				int can4 = ans [i] / 4 - 1;
				ans [i] ++;
				for (int j = 0; j <= can4; j++) {
					if (j * 4 + 2 == x) {
						out.println(i);
						find = true;
						break global;
					}
				}
			}

			if (!find) {
				global:
				for (int i = 5; i <= 500; i += 4) {
					ans [i] --;
					int can4 = ans [i] / 4 - 1;
					ans [i] ++;
					for (int j = 0; j <= can4; j++) {
						if (j * 4 + 3 == x) {
							out.println(i);
							find = true;
							break global;
						}
					}
				}
			}

			if (!find) {
				global:
				for (int i = 7; i <= 500; i += 4) {
					ans [i] --;
					int can4 = ans [i] / 4 - 2;
					ans [i] ++;
					for (int j = 0; j <= can4; j++) {
						if (j * 4 + 3 == x) {
							out.println(i);
							find = true;
							break global;
						}
					}
				}
			}

		}

	}

	static final String fname = "";
	static long stime = 0;

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st;

	private String nextToken () throws Exception {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		return st.nextToken();
	}

	private int nextInt () throws Exception {
		return Integer.parseInt(nextToken());
	}

	private long nextLong () throws Exception {
		return Long.parseLong(nextToken());
	}

	private double nextDouble () throws Exception {
		return Double.parseDouble(nextToken());
	}

	@Override
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			solve ();
		} catch (Exception e) {
			throw new RuntimeException(e);
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) {
		new Thread(null, new Solution(), "", 1<<26).start();
	}

}

import java.io.*;
import java.util.*;

public class A {
    public void run() throws IOException {
        // 4 * (i-1) + 2 * (i-1) * 2 + 1
        final int n = IOFast.nextInt();
        for(int i = 1; ; i++) if(i != 2) {
            if(i % 2 == 0) {
                final int j = i / 2 - 1;
                if(n % 4 == 0 && (j * j + 1) / 2 * 4 >= n) {
                    IOFast.out.println(i);
                    break;
                }
            }
            else {
                if((i * i + 1) / 2 >= n) {
                    IOFast.out.println(i);
                    break;
                }
            }
        }
    }

    public static void main(String[] args) throws IOException {
        new A().run();
        IOFast.out.flush();
    }

    static public class IOFast {
        private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        private static PrintWriter out = new PrintWriter(System.out);

//      private static final int BUFFER_SIZE = 50 * 200000;
        private static final StringBuilder buf = new StringBuilder();
        private static boolean[] isDigit = new boolean[256];
        private static boolean[] isSpace = new boolean[256];

        static {
            for(int i = 0; i < 10; i++) {
                isDigit['0' + i] = true;
            }
            isDigit['-'] = true;
            isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
        }

        static boolean endInput;

        private static int nextInt() throws IOException {
            boolean plus = false;
            int ret = 0;
            while(true) {
                final int c = in.read();

                if(c == -1) {
                    endInput = true;
                    return Integer.MIN_VALUE;
                }

                if(isDigit[c]) {
                    if(c != '-') {
                        plus = true;
                        ret = c - '0';
                    }
                    break;
                }
            }

            while(true) {
                final int c = in.read();
                if(c == -1 || !isDigit[c]) {
                    break;
                }
                ret = ret * 10 + c - '0';
            }

            return plus ? ret : -ret;
        }

        private static long nextLong() throws IOException {
            boolean plus = false;
            long ret = 0;
            while(true) {
                final int c = in.read();

                if(c == -1) {
                    endInput = true;
                    return Integer.MIN_VALUE;
                }

                if(isDigit[c]) {
                    if(c != '-') {
                        plus = true;
                        ret = c - '0';
                    }
                    break;
                }
            }

            while(true) {
                final int c = in.read();
                if(c == -1 || !isDigit[c]) {
                    break;
                }
                ret = ret * 10 + c - '0';
            }

            return plus ? ret : -ret;
        }

        private static String next() throws IOException {
            buf.setLength(0);

            while(true) {
                final int c = in.read();

                if(c == -1) {
                    endInput = true;
                    return "-1";
                }

                if(!isSpace[c]) {
                    buf.append((char)c);
                    break;
                }
            }

            while(true) {
                final int c = in.read();

                if(c == -1 || isSpace[c]) {
                    break;
                }
                buf.append((char)c);
            }

            return buf.toString();
        }

        private static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

    }

}

import java.io.*;
import java.util.*;

public class A {
    public void run() throws IOException {
        final int n = IOFast.nextInt();
        for(int i = 1; ; i++) if(i != 2) {
            if((i * i + 1) / 2 >= n) {
                IOFast.out.println(i);
                break;
            }
        }
    }

    public static void main(String[] args) throws IOException {
        new A().run();
        IOFast.out.flush();
    }

    static public class IOFast {
        private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        private static PrintWriter out = new PrintWriter(System.out);

//      private static final int BUFFER_SIZE = 50 * 200000;
        private static final StringBuilder buf = new StringBuilder();
        private static boolean[] isDigit = new boolean[256];
        private static boolean[] isSpace = new boolean[256];

        static {
            for(int i = 0; i < 10; i++) {
                isDigit['0' + i] = true;
            }
            isDigit['-'] = true;
            isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
        }

        static boolean endInput;

        private static int nextInt() throws IOException {
            boolean plus = false;
            int ret = 0;
            while(true) {
                final int c = in.read();

                if(c == -1) {
                    endInput = true;
                    return Integer.MIN_VALUE;
                }

                if(isDigit[c]) {
                    if(c != '-') {
                        plus = true;
                        ret = c - '0';
                    }
                    break;
                }
            }

            while(true) {
                final int c = in.read();
                if(c == -1 || !isDigit[c]) {
                    break;
                }
                ret = ret * 10 + c - '0';
            }

            return plus ? ret : -ret;
        }

        private static long nextLong() throws IOException {
            boolean plus = false;
            long ret = 0;
            while(true) {
                final int c = in.read();

                if(c == -1) {
                    endInput = true;
                    return Integer.MIN_VALUE;
                }

                if(isDigit[c]) {
                    if(c != '-') {
                        plus = true;
                        ret = c - '0';
                    }
                    break;
                }
            }

            while(true) {
                final int c = in.read();
                if(c == -1 || !isDigit[c]) {
                    break;
                }
                ret = ret * 10 + c - '0';
            }

            return plus ? ret : -ret;
        }

        private static String next() throws IOException {
            buf.setLength(0);

            while(true) {
                final int c = in.read();

                if(c == -1) {
                    endInput = true;
                    return "-1";
                }

                if(!isSpace[c]) {
                    buf.append((char)c);
                    break;
                }
            }

            while(true) {
                final int c = in.read();

                if(c == -1 || isSpace[c]) {
                    break;
                }
                buf.append((char)c);
            }

            return buf.toString();
        }

        private static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.HashMap;
import java.util.Map.Entry;

public class C {

    private StreamTokenizer in;
    private PrintWriter out;

    public static void main (String[] args) throws IOException {
        new C().solve();
    }

    int nextInt () throws IOException {
        in.nextToken();
        return (int)in.nval;
    }

    void solve () throws IOException {
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(new OutputStreamWriter(System.out));

        int n = nextInt();
        if (n == 3) {
            out.print(5);
            out.flush();
            return;
        }

        int i = 3;
        while (true) {
            int res = (int)Math.pow(i / 2, 2) + (int)Math.pow((i / 2) + 1, 2);
            if (res >= n) {
                out.print(i);
                out.flush();
                return;
            }
            i += 2;
        }
    }

}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class C
{
	String line;
	StringTokenizer inputParser;
	BufferedReader is;
	FileInputStream fstream;
	DataInputStream in;
	String FInput="";

	void openInput(String file)
	{

		if(file==null)is = new BufferedReader(new InputStreamReader(System.in));//stdin
		else
		{
			try{

			fstream = new FileInputStream(file);
			in = new DataInputStream(fstream);
			is = new BufferedReader(new InputStreamReader(in));
			}catch(Exception e)
			{
				System.err.println(e);
			}
		}

	}

	void readNextLine()
	{
		try {
			line = is.readLine();
			inputParser = new StringTokenizer(line, " ");
			//System.err.println("Input: " + line);
		} catch (IOException e) {
			System.err.println("Unexpected IO ERROR: " + e);
		}

	}

	int NextInt()
	{
		String n = inputParser.nextToken();
		int val = Integer.parseInt(n);

		//System.out.println("I read this number: " + val);
		return val;
	}

	String NextString()
	{
		String n = inputParser.nextToken();
		return n;
	}

	void closeInput()
	{
		try {
			is.close();
		} catch (IOException e) {
			System.err.println("Unexpected IO ERROR: " + e);
		}

	}

	public void readFInput()
	{
		for(;;)
		{
			try
			{
				readNextLine();
				FInput+=line+" ";
			}
			catch(Exception e)
			{
				break;
			}
		}
		inputParser = new StringTokenizer(FInput, " ");
	}

	long NextLong()
    {
            String n = inputParser.nextToken();

            long val = Long.parseLong(n);

            return val;
    }

	public static void main(String [] argv)
	{
		String filePath=null;
		if(argv.length>0)filePath=argv[0];
		new C(filePath);
	}

	public C(String inputFile)
	{
		openInput(inputFile);

		readNextLine();
		int n=NextInt();
		int ret=1;
		while((ret*ret)/2+1<n)
		{
			ret+=2;
		}

		System.out.println(ret);
        closeInput();
	}

}

/**
 * Alipay.com Inc. Copyright (c) 2004-2020 All Rights Reserved.
 */

import java.util.Scanner;

/**
 *
 * @author linwanying
 * @version $Id: A201.java, v 0.1 2020年06月14日 4:32 PM linwanying Exp $
 */
public class A201 {
    public static void main(String[] args) {
        new A201().run();
    }

    private void run() {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();

        int r2 = x*2 -1;

        int i = 1;
        while(i*i < r2) {
            i++;
        }

        System.out.println(i);
    }
}

import java.util.Scanner;

public class Matrix {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int lowermax=1;
        int uppermax=1;
        int side=-1;
       do {
           side+=2;
            lowermax= uppermax;
            uppermax= (((side/2)+1)*((side/2)+1)) + ((side/2)*(side/2));

        } while ( num > uppermax );

 System.out.println(side);
    }

}

import java.util.*;

public class Solution
{
    public static void main(String []args)
    {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int dp[] = new int[1001];
        if(x == 1)
        System.out.println(1);

        if(x == 3)
        System.out.println(5);

        else
        {
        for(int i = 0 ; i < 1001; i++)
        {
            dp[i] = -1;
        }

        dp[1] = 1;
        dp[2] = 1;

        int i = 3;
        while(true)
        {
            if(dp[i] == -1)
            {
           if(i%2 == 1)
           dp[i] = dp[i - 2] + 2*(i - 1);

           else
           {
             dp[i] = dp[i - 2] + 2*(i - 2);

             if(i + 2 <= 1000)
             dp[i + 2] = dp[i] + 2*(i - 2);
           }

            }

            if(dp[i] >= x)
            {
            System.out.println(i);
            break;
            }

            i++;

        }

        }
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        Long input = scanner.nextLong();
        System.out.print((long) Math.ceil(Math.sqrt(2*input)));
    }
}

import java.io.*;
import java.util.*;

public class C {
	static Scanner scan = new Scanner (System.in);
	static PrintStream out = System.out;

	public static void main (String[] args) {
		int x = scan.nextInt();
		int n = 1;
		while (n*n/2+1 < x) {
			n += 2;
		}
		out.println (n);
	}
}

import java.util.*;
import java.io.*;

public class Solution {
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int x = in.nextInt();

        int capacity = 0;
        int n = 0;
        while (capacity < x) {
            capacity += 1 + 2 * (n / 2);
            n++;
        }

        System.out.println(n);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg) {
        new Solution().run();
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) throws Exception
    {

        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        for (int n = 1 ; ; n += 2){
            if (((n >> 1) & 1) == 0){
                int can = 1 + ((((n >> 1) + 1) * (n >> 1 >> 1) + ((n >> 1)) * (n >> 1 >> 1)) << 1);
                can += ((n >> 1));
                if (can >= x) {
                    System.out.println(n);
                    break;
                }

            }
            else {
                int can = 1 + ((((n >> 1) + 1) * (n >> 1 >> 1) + (((n >> 1)) * ((n >> 1 >> 1) + 1))) << 1);
                can += ((n >> 1) + 1);
                if (can >= x) {
                    System.out.println(n);
                    break;
                }
            }

        }
    }
}

import java.io.*;
import java.util.*;

public class Main {
  BufferedReader br;
  int x, n;

  public void go() throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    x = Integer.parseInt(br.readLine());

    if (x == 1) {
      System.out.println("1");
      return;
    }

    if (x == 2) {
      System.out.println("3");
      return;
    }

    for (n = 1; n <= 1000; n++)
      if ((n * n + 1) / 2 >= x)
        break;

    System.out.println(n);
  }

  public static void main(String[] args) throws Exception {
    new Main().go();
  }
}

import java.util.*;

public class Main {
	static long mod = 1000000007;
  static int size = 200000;
	static long[] fac = new long[size];
	static long[] finv = new long[size];
	static long[] inv = new long[size];
	static int INF = Integer.MAX_VALUE;

 	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt();
		if(x == 3){
			System.out.println(5);
			return;
		}
		for(int n = 1; n <= 100; n+=2){
			if(x <= n*(n+1)/2){
				System.out.println(n);
				return;
			}
		}
	}
	public static boolean isPrime(int n){
		if(n == 1) return false;
		if(n == 2 || n == 3) return true;
		for(int i = 2; i <= Math.sqrt(n); i++){
			if(n % i == 0) return false;
		}
		return true;
	}
	// tar の方が数字が大きいかどうか
	static boolean compare(String tar, String src) {
		if (src == null) return true;
		if (src.length() == tar.length()) {
			int len = tar.length();
			for (int i = 0; i < len; i++) {
				if (src.charAt(i) > tar.charAt(i)) {
					return false;
				} else if (src.charAt(i) < tar.charAt(i)) {
					return true;
				}
			}
			return tar.compareTo(src) > 0 ? true : false;
		} else if (src.length() < tar.length()) {
			return true;
		} else if (src.length() > tar.length()) {
			return false;
		}
		return false;
	}
	public static class Edge{
		int from;
		int to;
		Edge(int from, int to){
			this.from = from;
			this.to = to;
		}
	}
	public static void swap(long a, long b){
		long tmp = 0;
		if(a > b){
			tmp = a;
			a = b;
			b = tmp;
		}
	}
  static class Pair implements Comparable<Pair>{
    int first, second;
    Pair(int a, int b){
        first = a;
        second = b;
    }
    @Override
    public boolean equals(Object o){
        if (this == o) return true;
        if (!(o instanceof Pair)) return false;
        Pair p = (Pair) o;
        return first == p.first && second == p.second;
    }
    @Override
    public int compareTo(Pair p){
        return first == p.first ? second - p.second : first - p.first; //firstで昇順にソート
        //return (first == p.first ? second - p.second : first - p.first) * -1; //firstで降順にソート
        //return second == p.second ? first - p.first : second - p.second;//secondで昇順にソート
        //return (second == p.second ? first - p.first : second - p.second)*-1;//secondで降順にソート
    }
  }

  //繰り返し二乗法
  public static long pow(long x, long n){
    long ans = 1;
    while(n > 0){
      if((n & 1) == 1){
        ans = ans * x;
        ans %= mod;
      }
      x = x * x % mod;
      n >>= 1;
    }
    return ans;
  }

	public static long div(long x, long y){
		return (x*pow(y, mod-2))%mod;
	}

  //fac, inv, finvテーブルの初期化、これ使う場合はinitComb()で初期化必要
	public static  void initComb(){
		fac[0] = finv[0] = inv[0] = fac[1] = finv[1] = inv[1] = 1;
		for (int i = 2; i < size; ++i) {
			fac[i] = fac[i - 1] * i % mod;
			inv[i] = mod - (mod / i) * inv[(int) (mod % i)] % mod;
			finv[i] = finv[i - 1] * inv[i] % mod;
		}
	}

	//nCk % mod
	public static long comb(int n, int k){
		return fac[n] * finv[k] % mod * finv[n - k] % mod;
	}

	//n! % mod
	public static long fact(int n){
		return fac[n];
	}

	//(n!)^-1 with % mod
	public static long finv(int n){
		return finv[n];
	}

  static class UnionFind {
    int[] parent;
    public UnionFind(int size) {
      parent = new int[size];
      Arrays.fill(parent, -1);
    }
    public boolean unite(int x, int y) {
      x = root(x);
      y = root(y);
      if (x != y) {
        if (parent[y] < parent[x]) {
          int tmp = y;
          y = x;
          x = tmp;
        }
        parent[x] += parent[y];
        parent[y] = x;
        return true;
      }
      return false;
    }
    public boolean same(int x, int y) {
      return root(x) == root(y);
    }
    public int root(int x) {
      return parent[x] < 0 ? x : (parent[x] = root(parent[x]));
    }
    public int size(int x) {
      return -parent[root(x)];
    }
  }
	public static int upperBound(int[] array, int value) {
			 int low = 0;
			 int high = array.length;
			 int mid;
			 while( low < high ) {
					 mid = ((high - low) >>> 1) + low; // (high + low) / 2
					 if( array[mid] <= value ) {
							 low = mid + 1;
					 } else {
							 high = mid;
					 }
			 }
			 return low;
	 }
	 public static final int lowerBound(final int[] arr, final int value) {
    	int low = 0;
    	int high = arr.length;
    	int mid;
    	while (low < high){
        	mid = ((high - low) >>> 1) + low;    //(low + high) / 2 (オーバーフロー対策)
        	if (arr[mid] < value) {
          	low = mid + 1;
        	} else {
            high = mid;
        	}
    	}
    	return low;
		}
  //n,mの最大公約数
  public static long gcd(long n, long m){
    if(m > n) return gcd(m,n);
    if(m == 0) return n;
    return gcd(m, n%m);
  }
	//3要素のソート
	private class Pair2 implements Comparable<Pair2> {
		String s;
		int p;
		int index;
		public Pair2(String s, int p, int index) {
				this.s = s;
				this.p = p;
				this.index = index;
		}

		public int compareTo(Pair2 other) {
				if (s.equals(other.s)) {
						return other.p - this.p;
				}
				return this.s.compareTo(other.s);
		}
	}
	//c -> intに変換
public static int c2i(char c){
	if('A' <= c && c <= 'Z'){
		return c - 'A';
	}else{
		return c - 'a' + 26;
	}
}
// int -> charに変換
public static char i2c(int i){
	if(0 <= i && i < 26){
			return (char)(i + 'A');
	}else{
			return (char)(i + 'a' - 26);
	}
}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
 * Created by Tejas on 17-07-2018.
 */
public class Main  {

    public static void main(String[]args)throws IOException{
        BufferedReader bufferedReader=new BufferedReader(new InputStreamReader(System.in));
        int x=Integer.parseInt(bufferedReader.readLine());
        System.out.println(solve(x));
    }

    private static int solve(int x) {
        if(x==2)
            return 3;
        if(x==3 || x==6 ||x==7 || x==11)
            return 5;
        int k=x/4;
        return  2*k+1;
    }
}

import java.util.Scanner;

public class Matrix {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int lowermax=1;
        int uppermax=1;
        int side=-1;
       do {
           side+=2;
            lowermax= uppermax;
            uppermax= (((side/2)+1)*((side/2)+1)) + ((side/2)*(side/2));

        } while ( num > uppermax );
        if  (num!=0)
 {System.out.println(side);}
        else
            System.out.println(0);
    }

}

import java.util.*;
import java.lang.*;
import java.io.*;
import java.awt.Point;

// SHIVAM GUPTA :
//NSIT
//decoder_1671

// STOP NOT TILL IT IS DONE OR U DIE .

// U KNOW THAT IF THIS DAY WILL BE URS THEN NO ONE CAN DEFEAT U HERE................

// ASCII = 48 + i ;// 2^28 = 268,435,456  > 2* 10^8 // log 10 base 2 = 3.3219

// odd:: (x^2+1)/2 , (x^2-1)/2 ; x>=3// even:: (x^2/4)+1 ,(x^2/4)-1  x >=4

// FOR ANY ODD NO N : N,N-1,N-2
//ALL ARE PAIRWISE COPRIME
//THEIR COMBINED LCM IS PRODUCT OF ALL THESE NOS

// two consecutive odds are always coprime to each other
// two consecutive even have always gcd  = 2 ;

public class Main
{
     // static int[] arr = new int[100002] ; // static int[] dp = new int[100002] ;

     static PrintWriter out;

	static class FastReader{
		BufferedReader br;
		StringTokenizer st;
		public FastReader(){
			br=new BufferedReader(new InputStreamReader(System.in));
			out=new PrintWriter(System.out);
		}
		String next(){
			while(st==null || !st.hasMoreElements()){
				try{
					st= new StringTokenizer(br.readLine());
				}
				catch (IOException e){
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		int nextInt(){
			return Integer.parseInt(next());
		}
		long nextLong(){
			return Long.parseLong(next());
		}
		double nextDouble(){
			return Double.parseDouble(next());
		}
		String nextLine(){
			String str = "";
			try{
				str=br.readLine();
			}
			catch(IOException e){
				e.printStackTrace();
			}
			return str;
		}
	}

////////////////////////////////////////////////////////////////////////////////////
 public static int countDigit(long n)
    {
        return (int)Math.floor(Math.log10(n) + 1);
    }

/////////////////////////////////////////////////////////////////////////////////////////

 public static int sumOfDigits(long n)
 {

  if( n< 0)return -1 ;

  int sum = 0;

  while( n > 0)
  {
      sum = sum + (int)( n %10) ;

      n /= 10 ;
  }

  return sum ;

 }

 //////////////////////////////////////////////////////////////////////////////////////////////////

public static long arraySum(int[] arr , int start , int end)
{
    long ans = 0 ;

    for(int i = start ; i <= end  ; i++)ans += arr[i] ;

    return ans  ;
}

/////////////////////////////////////////////////////////////////////////////////

public static int mod(int x)
{
      if(x <0)return -1*x ;
      else return x ;
}
public static long mod(long x)
{
      if(x <0)return -1*x ;
      else return x ;
}

////////////////////////////////////////////////////////////////////////////////

public static void swapArray(int[] arr , int start , int end)
{
    while(start < end)
    {
        int temp = arr[start] ;
        arr[start] = arr[end];
        arr[end] = temp;
        start++ ;end-- ;
    }
}

//////////////////////////////////////////////////////////////////////////////////

public static int[][] rotate(int[][] input){

int n =input.length;
int m = input[0].length ;
int[][] output = new int [m][n];

for (int i=0; i<n; i++)
	for (int j=0;j<m; j++)
		output [j][n-1-i] = input[i][j];
return output;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////

public static int countBits(long n)
    {
        int count = 0;
        while (n != 0)
        {
            count++;
            n = (n) >> (1L) ;
        }

        return count;

    }
/////////////////////////////////////////// ////////////////////////////////////////////////

public static boolean isPowerOfTwo(long n)
{
    if(n==0)
    return false;

if(((n ) & (n-1)) == 0 ) return true ;
else return false  ;

}

/////////////////////////////////////////////////////////////////////////////////////

public static int  min(int a ,int b , int c, int d)
{
     int[] arr = new int[4] ;
      arr[0] = a;arr[1] = b ;arr[2] = c;arr[3] = d;Arrays.sort(arr) ;

      return arr[0];
}
 /////////////////////////////////////////////////////////////////////////////
public static int  max(int a ,int b , int c, int d)
{
     int[] arr = new int[4] ;
      arr[0] = a;arr[1] = b ;arr[2] = c;arr[3] = d;Arrays.sort(arr) ;

      return arr[3];
}

///////////////////////////////////////////////////////////////////////////////////

public static String reverse(String input)
{
  StringBuilder str  = new StringBuilder("") ;

    for(int i =input.length()-1 ; i >= 0  ; i-- )
    {
        str.append(input.charAt(i));
    }

return str.toString() ;
}
///////////////////////////////////////////////////////////////////////////////////////////

public static boolean sameParity(long a  ,long b )
{
     long x = a% 2L; long y = b%2L ;
     if(x==y)return true  ;
     else return false  ;
}

////////////////////////////////////////////////////////////////////////////////////////////////////
public static boolean isPossibleTriangle(int a  ,int b , int c)
{
      if( a + b > c && c+b > a && a +c > b)return true  ;
      else return false  ;
}

////////////////////////////////////////////////////////////////////////////////////////////
static long xnor(long num1, long num2) {
		if (num1 < num2) {
			long temp = num1;
			num1 = num2;
			num2 = temp;
		}
		num1 = togglebit(num1);
		return num1 ^ num2;
	}

	static long togglebit(long n) {
		if (n == 0)
			return 1;
		long i = n;
		n |= n >> 1;
		n |= n >> 2;
		n |= n >> 4;
		n |= n >> 8;
		n |= n >> 16;
		return i ^ n;
	}

///////////////////////////////////////////////////////////////////////////////////////////////

public static int xorOfFirstN(int n)
{

 if( n % 4 ==0)return n ;

 else if( n % 4 == 1)return 1 ;

 else if( n % 4 == 2)return n+1 ;

 else return 0 ;

}
//////////////////////////////////////////////////////////////////////////////////////////////

public static int gcd(int a, int b )
{

if(b==0)return a ;

else return gcd(b,a%b) ;

}

public static long gcd(long a, long b )
{

if(b==0)return a ;

else return gcd(b,a%b) ;

}

////////////////////////////////////////////////////////////////////////////////////

public static int lcm(int a, int b ,int c , int d )
{

int temp = lcm(a,b , c) ;

 int ans = lcm(temp ,d ) ;

return ans  ;

}

///////////////////////////////////////////////////////////////////////////////////////////

public static int lcm(int a, int b ,int c )
{

int temp = lcm(a,b) ;

int ans =  lcm(temp ,c) ;

return ans  ;

}

////////////////////////////////////////////////////////////////////////////////////////

public static int lcm(int a , int b )
{

int gc = gcd(a,b);

return (a*b)/gc ;
}

public static long lcm(long a , long b )
{

long gc = gcd(a,b);

return (a*b)/gc ;
}

///////////////////////////////////////////////////////////////////////////////////////////
static boolean isPrime(long n)
{
      if(n==1)
      {
            return false  ;
      }

      boolean ans =  true  ;

      for(long i = 2L; i*i <= n ;i++)
      {
            if(n% i ==0)
            {
                  ans = false  ;break ;
            }
      }

      return ans  ;
}
///////////////////////////////////////////////////////////////////////////

static int sieve =  1000000 ;

static boolean[] prime =  new boolean[sieve + 1] ;

public static void sieveOfEratosthenes()
    {
        // FALSE == prime

        // TRUE ==  COMPOSITE

        // FALSE== 1

        // time complexity = 0(NlogLogN)== o(N)

        // gives prime nos bw 1 to N

        for(int i = 4; i<= sieve ; i++)
        {
            prime[i] = true  ;
            i++ ;
        }

        for(int p = 3; p*p <= sieve; p++)
        {

            if(prime[p] == false)
            {

                for(int i = p*p; i <= sieve; i += p)
                    prime[i] = true;
            }

            p++ ;
        }

    }

///////////////////////////////////////////////////////////////////////////////////

public static void sortD(int[] arr , int s  , int e)
{
      sort(arr ,s , e) ;

      int i =s ; int j = e  ;

      while( i < j)
      {
            int temp = arr[i] ;
            arr[i] =arr[j] ;
            arr[j] = temp ;
            i++ ; j-- ;
      }

      return ;
}

public static void sortD(long[] arr , int s  , int e)
{
      sort(arr ,s , e) ;

      int i =s ; int j = e  ;

      while( i < j)
      {
            long temp = arr[i] ;
            arr[i] =arr[j] ;
            arr[j] = temp ;
            i++ ; j-- ;
      }

      return ;
}

/////////////////////////////////////////////////////////////////////////////////////////

public static long countSubarraysSumToK(long[] arr ,long sum )
    {
      HashMap<Long,Long> map = new HashMap<>() ;

      int n = arr.length ;

      long prefixsum = 0 ;

      long count = 0L ;
      for(int i  = 0; i < n ; i++)
      {
          prefixsum  = prefixsum +  arr[i] ;

          if(sum == prefixsum)count = count+1 ;

          if(map.containsKey(prefixsum -sum))
          {
              count = count + map.get(prefixsum -sum) ;
          }

          if(map.containsKey(prefixsum ))
          {
              map.put(prefixsum , map.get(prefixsum) +1 );
          }

          else{
              map.put(prefixsum , 1L );
          }

      }

      return count  ;

    }

///////////////////////////////////////////////////////////////////////////////////////////////

// KMP ALGORITHM : TIME COMPL:O(N+M)
// FINDS THE OCCURENCES OF PATTERN AS A  SUBSTRING IN STRING
//RETURN THE ARRAYLIST OF INDEXES
// IF SIZE OF LIST IS ZERO MEANS PATTERN IS NOT PRESENT IN STRING

public static ArrayList<Integer> kmpAlgorithm(String str , String pat)
     {
        ArrayList<Integer> list =new ArrayList<>();

        int n = str.length() ;
        int m = pat.length() ;

        String q = pat + "#" + str ;

        int[] lps  =new int[n+m+1] ;

         longestPefixSuffix(lps, q,(n+m+1)) ;

         for(int i =m+1 ; i < (n+m+1) ; i++ )
         {
             if(lps[i] == m)
             {
                 list.add(i-2*m) ;
             }
         }

        return list ;

    }

public static void longestPefixSuffix(int[] lps ,String str , int n)
    {
        lps[0] =  0 ;

        for(int i = 1  ; i<= n-1; i++)
        {
          int l = lps[i-1] ;

          while( l > 0 && str.charAt(i) != str.charAt(l))
          {
              l = lps[l-1] ;
          }

          if(str.charAt(i) == str.charAt(l))
          {
              l++ ;
          }

          lps[i] = l ;
        }

    }

///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////

 // CALCULATE TOTIENT Fn FOR ALL VALUES FROM 1 TO n
    // TOTIENT(N) = count of nos less than ornequal to n and greater than 1 whose gcd with n is 1
    // or n and the no  will be coprime in nature
    //time : O(n*(log(logn)))

    public static void eulerTotientFunction(int[] arr ,int n )
    {

      for(int i = 1; i <= n  ;i++)arr[i] =i  ;

      for(int i= 2 ; i<= n ;i++)
      {
          if(arr[i] == i)
          {
              arr[i] =i-1 ;

              for(int j =2*i ; j<= n  ; j+= i )
              {
                  arr[j] = (arr[j]*(i-1))/i ;
              }

          }
      }

      return  ;

    }

/////////////////////////////////////////////////////////////////////////////////////////////
public static long nCr(int n,int k)
{
    long ans=1L;
    k=k>n-k?n-k:k;
    int j=1;
    for(;j<=k;j++,n--)
    {
        if(n%j==0)
        {
            ans*=n/j;
        }else
        if(ans%j==0)
        {
            ans=ans/j*n;
        }else
        {
            ans=(ans*n)/j;
        }
    }
    return ans;
}

///////////////////////////////////////////////////////////////////////////////////////////

public static ArrayList<Integer> allFactors(int n)
{
      ArrayList<Integer> list = new ArrayList<>() ;

    for(int i = 1; i*i <= n ;i++)
    {
          if( n % i == 0)
          {
              if(i*i == n)
              {
                    list.add(i) ;
              }
              else{
                    list.add(i) ;
                    list.add(n/i) ;

              }
          }
    }

     return list ;

}

public static ArrayList<Long> allFactors(long n)
{
      ArrayList<Long> list = new ArrayList<>() ;

    for(long i = 1L; i*i <= n ;i++)
    {
          if( n % i == 0)
          {
              if(i*i == n)
              {
                    list.add(i) ;
              }
              else{
                    list.add(i) ;
                    list.add(n/i) ;

              }
          }
    }

     return list ;

}
////////////////////////////////////////////////////////////////////////////////////////////////////

  static final int MAXN = 10000001;

    static int spf[] = new int[MAXN];

    static void sieve()
    {
        spf[1] = 1;
        for (int i=2; i<MAXN; i++)

            spf[i] = i;

        for (int i=4; i<MAXN; i+=2)
            spf[i] = 2;

        for (int i=3; i*i<MAXN; i++)
        {

            if (spf[i] == i)
            {

                for (int j=i*i; j<MAXN; j+=i)

                    if (spf[j]==j)
                        spf[j] = i;
            }
        }
    }

// The above code works well for n upto the order of 10^7.
// Beyond this we will face memory issues.

// Time Complexity: The precomputation for smallest prime factor is done in O(n log log n)
// using sieve.
// Where as in the calculation step we are dividing the number every time by
// the smallest prime number till it becomes 1.
// So, let’s consider a worst case in which every time the SPF is 2 .
// Therefore will have log n division steps.

// Hence, We can say that our Time Complexity will be O(log n) in worst case.

    static Vector<Integer> getFactorization(int x)
    {
        Vector<Integer> ret = new Vector<>();
        while (x != 1)
        {
            ret.add(spf[x]);
            x = x / spf[x];
        }
        return ret;
    }

 //////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////

public static void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int[n1];
        int R[] = new int[n2];

      //Copy data to temp arrays
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
  public static void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }

public static void sort(long arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }

public static void merge(long arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[] = new long[n1];
        long R[] = new long[n2];

        //Copy data to temp arrays
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

 /////////////////////////////////////////////////////////////////////////////////////////

	public static long knapsack(int[] weight,long value[],int maxWeight){

        int n=  value.length ;

	//dp[i] stores the profit with KnapSack capacity "i"
  long []dp = new long[maxWeight+1];

    //initially profit with 0 to W KnapSack capacity is 0
    Arrays.fill(dp, 0);

    // iterate through all items
    for(int i=0; i < n; i++)

        //traverse dp array from right to left
        for(int j = maxWeight; j >= weight[i]; j--)
            dp[j] = Math.max(dp[j] , value[i] + dp[j - weight[i]]);

    /*above line finds out maximum of dp[j](excluding ith element value)
    and val[i] + dp[j-wt[i]] (including ith element value and the
    profit with "KnapSack capacity - ith element weight") */
    return dp[maxWeight];
	}

///////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////

// to return max sum of any subarray in given array
public static long kadanesAlgorithm(long[] arr)
{
      long[] dp = new long[arr.length] ;

      dp[0] = arr[0] ;
      long max =  dp[0] ;

      for(int i = 1; i <  arr.length ; i++)
      {
            if(dp[i-1] > 0)
            {
                  dp[i] = dp[i-1] + arr[i] ;
            }
            else{
                  dp[i] = arr[i] ;
            }

            if(dp[i] >  max)max = dp[i] ;

      }

      return max  ;

}
/////////////////////////////////////////////////////////////////////////////////////////////
public static long kadanesAlgorithm(int[] arr)
{
      long[] dp = new long[arr.length] ;

      dp[0] = arr[0] ;
      long max =  dp[0] ;

      for(int i = 1; i <  arr.length ; i++)
      {
            if(dp[i-1] > 0)
            {
                  dp[i] = dp[i-1] + arr[i] ;
            }
            else{
                  dp[i] = arr[i] ;
            }

            if(dp[i] >  max)max = dp[i] ;

      }

      return max  ;

}

///////////////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////////////

public static long binarySerachGreater(int[] arr , int start , int end , int val)
{

      // fing total no of elements strictly grater than val in sorted array arr

      if(start >  end)return  0 ; //Base case

      int mid = (start + end)/2  ;

      if(arr[mid] <=val)
      {
          return binarySerachGreater(arr,mid+1, end ,val) ;

      }
      else{

         return binarySerachGreater(arr,start , mid -1,val) + end-mid+1 ;

      }

}

//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////

//TO GENERATE ALL(DUPLICATE ALSO EXIST) PERMUTATIONS OF A STRING

// JUST CALL generatePermutation( str,  start,  end) start :inclusive ,end : exclusive

//Function for swapping the characters at position I with character at position j
    public static String swapString(String a, int i, int j) {
        char[] b =a.toCharArray();
        char ch;
        ch = b[i];
        b[i] = b[j];
        b[j] = ch;
        return String.valueOf(b);
    }

//Function for generating different permutations of the string
    public static void generatePermutation(String str, int start, int end)
    {
        //Prints the permutations
        if (start == end-1)
            System.out.println(str);
        else
        {
            for (int i = start; i < end; i++)
            {
                //Swapping the string by fixing a character
                str = swapString(str,start,i);
                //Recursively calling function generatePermutation() for rest of the characters
                generatePermutation(str,start+1,end);
                //Backtracking and swapping the characters again.
                str = swapString(str,start,i);
            }
        }
    }

////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////

public static long factMod(long n, long mod) {
    if (n <= 1) return 1;
    long ans = 1;
    for (int i = 1; i <= n; i++) {
      ans = (ans * i) % mod;
    }
    return ans;
  }

/////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////

public static long power(long x  ,long n)
    {
        //time comp : o(logn)

        if(n==0)return 1L ;
        if(n==1)return x;

        long ans =1L  ;

      while(n>0)
      {
          if(n % 2 ==1)
          {
              ans = ans *x ;
          }

          n /= 2 ;

          x =  x*x ;

      }

      return ans ;
    }

////////////////////////////////////////////////////////////////////////////////////////////////////
public static long powerMod(long x, long n, long mod) {
    //time comp : o(logn)

    if(n==0)return 1L ;
        if(n==1)return x;

    long ans = 1;
    while (n > 0) {
      if (n % 2 == 1) ans = (ans * x) % mod;
      x = (x * x) % mod;
      n /= 2;
    }
    return ans;
  }

//////////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////

/*
lowerBound - finds largest element equal or less than value paased
upperBound - finds smallest element equal or more than value passed

if not present return -1;

*/

public static long lowerBound(long[] arr,long k)
	{
		long ans=-1;

		int start=0;
		int end=arr.length-1;

		while(start<=end)
		{
			int mid=(start+end)/2;

			if(arr[mid]<=k)
			{
				ans=arr[mid];
				start=mid+1;
			}
			else
			{
				end=mid-1;
			}

		}

		return ans;

	}

	public static int lowerBound(int[] arr,int k)
	{
		int ans=-1;

		int start=0;
		int end=arr.length-1;

		while(start<=end)
		{
			int mid=(start+end)/2;

			if(arr[mid]<=k)
			{
				ans=arr[mid];
				start=mid+1;
			}
			else
			{
				end=mid-1;
			}

		}

		return ans;

	}

	public static long upperBound(long[] arr,long k)
	{
		long ans=-1;

		int start=0;
		int end=arr.length-1;

		while(start<=end)
		{
			int mid=(start+end)/2;

			if(arr[mid]>=k)
			{
				ans=arr[mid];
				end=mid-1;
			}
			else
			{
				start=mid+1;
			}

		}

		return ans;
	}

	public static int upperBound(int[] arr,int k)
	{
		int ans=-1;

		int start=0;
		int end=arr.length-1;

		while(start<=end)
		{
			int mid=(start+end)/2;

			if(arr[mid]>=k)
			{
				ans=arr[mid];
				end=mid-1;
			}
			else
			{
				start=mid+1;
			}

		}

		return ans;
	}

//////////////////////////////////////////////////////////////////////////////////////////

public static void printArray(int[] arr , int si ,int ei)
{
    for(int i = si  ; i  <= ei ; i++)
    {
        out.print(arr[i] +" ") ;
    }

}

public static void printArrayln(int[] arr , int si ,int ei)
{
    for(int i = si  ; i  <= ei ; i++)
    {
        out.print(arr[i] +" ") ;
    }
    out.println() ;
}

public static void printLArray(long[] arr , int si , int ei)
{
    for(int i = si ; i  <= ei ; i++)
    {
        out.print(arr[i] +" ") ;
    }

}

public static void printLArrayln(long[] arr , int si , int ei)
{
    for(int i = si ; i  <= ei ; i++)
    {
        out.print(arr[i] +" ") ;
    }
    out.println() ;

}

public static void printtwodArray(int[][] ans)
{
    for(int i = 0; i< ans.length ; i++)
    {
        for(int j  = 0 ; j <  ans[0].length ; j++)out.print(ans[i][j] +" ");
        out.println() ;
    }
    out.println() ;

}

  static long modPow(long a, long x, long p) {
    //calculates a^x mod p in logarithmic time.
    long res = 1;
    while(x > 0) {
        if( x % 2 != 0) {
            res = (res * a) % p;
        }
        a = (a * a) % p;
        x /= 2;
    }
    return res;
}

  static long modInverse(long a, long p) {
    //calculates the modular multiplicative of a mod m.
    //(assuming p is prime).
    return modPow(a, p-2, p);
}

static long modBinomial(long n, long k, long p) {
// calculates C(n,k) mod p (assuming p is prime).

    long numerator = 1; // n * (n-1) * ... * (n-k+1)
    for (int i=0; i<k; i++) {
        numerator = (numerator * (n-i) ) % p;
    }

    long denominator = 1; // k!
    for (int i=1; i<=k; i++) {
        denominator = (denominator * i) % p;
    }

    // numerator / denominator mod p.
    return ( numerator* modInverse(denominator,p) ) % p;
}

/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////

 static ArrayList<Integer>[] tree ;
// static long[] child;
// static int mod= 1000000007 ;
// static int[][] pre  = new int[3001][3001];
// static int[][] suf = new int[3001][3001] ;

//program to calculate noof nodes in subtree for every vertex including itself

 public static void countNoOfNodesInsubtree(int child ,int par , int[] dp)
 {
     int count = 1 ;

     for(int x : tree[child])
     {

         if(x== par)continue  ;

         countNoOfNodesInsubtree(x,child,dp) ;

         count= count +  dp[x]   ;
     }

     dp[child] = count ;

 }

public static void depth(int child ,int par , int[] dp , int d )
 {
    dp[child] =d ;

     for(int x : tree[child])
     {

         if(x== par)continue  ;

         depth(x,child,dp,d+1) ;

     }

 }

public static void dfs(int sv , boolean[] vis)
{
    vis[sv] = true  ;

    for(int x : tree[sv])
    {
        if( !vis[x])
        {
            dfs(x ,vis) ;
        }
    }

}

//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////

public static void solve()
{
FastReader scn = new FastReader() ;

//Scanner scn = new Scanner(System.in);
//int[] store = {2 ,3, 5 , 7  ,11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 } ;

// product of first 11 prime nos is greater than 10 ^ 12;
//ArrayList<Integer> list = new ArrayList<>() ;
ArrayList<Long> list = new ArrayList<>() ;
ArrayList<Long> listl = new ArrayList<>() ;
ArrayList<Integer> lista = new ArrayList<>() ;
ArrayList<Integer> listb = new ArrayList<>() ;
//ArrayList<String> lists = new ArrayList<>() ;

HashMap<Integer,Integer> map = new HashMap<>() ;
//HashMap<Character,Integer> map = new HashMap<>() ;
//HashMap<Long,Long> map = new HashMap<>() ;
HashMap<Integer,Integer> map1  = new HashMap<>() ;
HashMap<Integer,Integer> map2  = new HashMap<>() ;
//HashMap<String,Integer> maps = new HashMap<>() ;
//HashMap<Integer,Boolean> mapb = new HashMap<>() ;
//HashMap<Point,Integer> point = new HashMap<>() ;

//  Set<Long> set = new HashSet<>() ;
Set<Integer> set = new HashSet<>() ;
//Set<Character> set = new HashSet<>() ;
 Set<Integer> setx = new HashSet<>() ;
 Set<Integer> sety = new HashSet<>() ;

StringBuilder sb =new StringBuilder("") ;

//Collections.sort(list);

//if(map.containsKey(arr[i]))map.put(arr[i] , map.get(arr[i]) +1 ) ;
//else map.put(arr[i],1) ;

// if(map.containsKey(temp))map.put(temp , map.get(temp) +1 ) ;
// else map.put(temp,1) ;

//int bit  =Integer.bitCount(n);
// gives total no of set bits in n;

// Arrays.sort(arr, new Comparator<Pair>() {
// 			@Override
// 			public int compare(Pair a, Pair b) {
// 				if (a.first != b.first) {
// 					return a.first - b.first; // for increasing order of first
// 				}
// 				return a.second - b.second ; //if first is same then sort on second basis
// 			}
// 		});

int testcases = 1;
 //testcases = scn.nextInt() ;
for(int testcase =1  ; testcase <= testcases ;testcase++)
{

 //if(map.containsKey(arr[i]))map.put(arr[i],map.get(arr[i])+1) ;else map.put(arr[i],1) ;
 //if(map.containsKey(temp))map.put(temp,map.get(temp)+1) ;else map.put(temp,1) ;

//  int n = scn.nextInt() ;int m = scn.nextInt() ;
// tree = new ArrayList[n] ;
// for(int i = 0; i< n; i++)
// {
//     tree[i] = new ArrayList<Integer>();
// }

//  for(int i = 0 ;  i <= m-1 ; i++)
// {
//     int fv = scn.nextInt()-1 ; int sv = scn.nextInt()-1 ;
//     tree[fv].add(sv) ;
//     tree[sv].add(fv) ;
// }
// boolean[] visited = new boolean[n] ;
// int ans = 0 ;
// for(int i = 0 ; i < n ; i++)
// {
//     if(!visited[i])
//     {
//         dfs(i , visited ) ;
//         ans++ ;
//     }
// }

int n = scn.nextInt() ;

       if( n==1)out.println(1) ;

       else if(n==2)out.println(3) ;

        else if(n==3)out.println(5) ;

       else if( n==4 || n==5)out.println(3) ;

       else{

          int i = 1 ;
          while(true)
          {

              if(((i*i)+1)/2 >= n ){out.println(i) ;break ;}

              i++ ;
          }

       }

sb.delete(0 , sb.length()) ;
list.clear() ;listb.clear() ;
map.clear() ;
map1.clear() ;
map2.clear() ;
set.clear() ;sety.clear() ;

} // test case  end loop

out.flush() ;
} // solve fn ends

public static void main (String[] args) throws java.lang.Exception
{

solve() ;

}

}

 class Pair
{
  int first ;

  int second  ;

@Override
	public String toString() {

	String ans = "" ;
	ans  += this.first ;
	ans += " ";
	ans += this.second ;

	return ans  ;
	}

}

import java.io.*;
import java.util.*;
import java.math.*;

public class Main {
    public static void main(String[] args) throws Exception {
        PrintWriter out = new PrintWriter(System.out,true);
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int x = Integer.parseInt(in.readLine());
        if(x == 1) out.println(1);
        if(x == 3) out.println(5);
        if(x > 1 && x <= 5) out.println(3);
        if(x > 5 && x <= 13) out.println(5);
        if(x > 13 && x <= 25) out.println(7);
        if(x > 25 && x <= 41) out.println(9);
        if(x > 41 && x <= 61) out.println(11);
        if(x > 61 && x <= 85) out.println(13);
        if(x > 85 && x <= 113) out.println(15);
    }
}

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.*;
import java.util.regex.*;
import java.text.*;
import java.math.*;
import java.awt.geom.*;

public class A {
	public static final boolean debug = false;
	void pln(Object o) {System.out.println(o.toString());}
	void pl(Object o) {System.out.print(o.toString());}

	public void solve() {
		Scanner sc = null;

		if (debug) {
			try {
				sc = new Scanner(new File("P1.in"));
			}
			catch (Exception e) {
				e.printStackTrace();
			}
		}
		else {
			sc = new Scanner(System.in);
		}

		int x = sc.nextInt();

		int n = Integer.MAX_VALUE;
		if (x % 4 == 0) {
			for (int k=1; k<=1000; k++) {
				if ((((k-1)*(k-1) + 1) / 2) * 4 >= x) {
					n = 2*k;
					break;
				}
			}
		}

		for (int k=1; k<=1000; k++) {
			int x1 = ((k*k + 1) / 2) * 4;
			int x2 = (k / 2) * 4;
			int x3 = 1;
			if (x1 + x2 + x3 >= x) {
				n = Math.min(n, 2*k + 1);
			}
		}

		System.out.println(n);
//		pw.close();
	}

	public static void main(String[] args) {
		A t = new A();
		t.solve();
	}
}

import java.util.Scanner;

public class C {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int n = 0;
        if(x == 1){
            n = 1;
        }else if (x == 2) {
            n = 2;
        }else if (x == 3) {
            n = 5;
        }else {
            n = (int) Math.ceil(Math.sqrt(2*x-1));
        }
        System.out.println(n);
    }
}

//package Round_127;

import java.util.Scanner;

public class c_beta {

	static long sum1(int n){
		long sum = n;
		n-=2;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	static long sum2(int n){
		n--;
		long sum = 0;
		while (n > 0){
			sum += n*2;
			n-=2;
		}
		return sum;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x = in.nextInt();
		int n = 1;
		if (x == 3 || x == 2){
			System.out.println(5);
			return;
		}
		while (sum1(n) < x && sum2(n) < x) n++;

		//n = (x / 4)*2  + (x % 4 == 1 || x % 4 == 2 ? 1 : x % 4 != 0 ? 5 : 1);
		System.out.println(n);
	}

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int x = in.nextInt();
        if (x == 1) out.printLine(1);
        else if (x == 2) out.printLine(3);
        else if (x == 3) out.printLine(5);
        else {
            int t = (int) (Math.sqrt(4 * x + 5) + 1) / 2;
            //out.printLine("t = " + t);
            if (t * t - t - 1 == x) {
                if (t % 2 == 0)
                    out.printLine(t + 1);
                else
                    out.printLine(t);
            } else {
                if ((x & 1) == 1)
                    out.printLine(t + 2);
                else
                    out.printLine(t + 1);
            }
        }
    }
}

class InputReader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
		return Integer.parseInt(next());
	}

	}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(outputStream);
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class ClearSymmetry_201A {

    /**
     * @param args
     */
    public static void main(String[] args)throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        for(int i= 3; i<100; i++){
            if(i%2==0 && ((i-2)*i)/2>=n ){
                System.out.println(i);
                return;
            }
//          System.out.println(i-1);
//          System.out.println((i-1)/2);
//          System.out.println(((((i-1)/2)*i)+1)/2*2);
            if(i%2==1 && (i*i+1)/2>=n ){
                System.out.println(i);
                return;
            }

        }
    }

}

import java.util.*;
public class Main {
    final int INF = 1 << 24;
    class C{
        int step,sum,preb;

        public C(int step, int sum, int preb) {
            this.step = step;this.sum = sum;this.preb = preb;
        }
    }

    private void doit(){
        Scanner sc = new Scanner (System.in);
        while(sc.hasNext()){
            int x = sc.nextInt();
            LinkedList<C> open = new LinkedList<C>();
            open.add(new C(2,1,1));
            open.add(new C(2,0,0));
            int ans = INF;
            while(! open.isEmpty()){
                C now = open.removeFirst();
                //System.out.println("sum= " + now.sum + " step= " + now.step);

                if(now.sum == x){
                    ans = Math.min(ans, now.step -1);
                    continue;
                }
                if(now.step == 10){
                    continue;
                }
                open.add(new C(now.step+1, now.sum, 0));
                for(int i=1; i <= now.step;i++){
                    int nowvalue = 1 << i;
                    int nextsum = now.sum + nowvalue;
                    //System.out.println(nextsum + " " + nowvalue);

                    if(nextsum > x){
                        break;
                    }
                    open.add(new C(now.step+1, nextsum, nowvalue));
                }
            }
            System.out.println(ans * 2 -1);
        }
    }

    public static void main(String[] args) {
        Main obj = new Main();
        obj.doit();
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;

public class A {

    String ans = "";
    String inp;

    public static void main(String[] args) throws IOException {
        Reader.init(System.in);
        new A();
    }
    A() throws IOException {
        Reader.init(System.in);
        solve();
    }

    void solve() throws IOException {

        int x = Reader.nextInt();
        int n = (int)Math.sqrt(x);
        System.out.println(2*n - 1);

    }

}

class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;
    /** call this method to initialize reader for InputStream */

    static void init(InputStream input) {
        reader = new BufferedReader(new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");

    }

    static String nextToken() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {

                tokenizer = new StringTokenizer(reader.readLine());

            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    static String next() throws IOException {

        while ( ! tokenizer.hasMoreTokens() ) {

            tokenizer = new StringTokenizer(

                    reader.readLine() );

        }
        return tokenizer.nextToken();

    }

    static int nextInt() throws IOException {

        return Integer.parseInt( next() );

    }

    static double nextDouble() throws IOException {

        return Double.parseDouble( next() );

    }

    static long nextLong() {

        return Long.parseLong(nextToken());
    }
}

import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Lokesh Khandelwal aka (codeKNIGHT | phantom11)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
	public void solve(int testNumber, Scanner in, PrintWriter out) {

        int x=in.nextInt(),i;
         //for(int x=1;x<=20;x++){
        for(i=1;;i+=2)
        {
            int j=(i*i+1)/2;
            if(j>=x)
                break;
        }

        out.println(i);

	}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) throws Exception
    {

        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        for (int n = 1 ; ; n += 2){
            if (((n >> 1) & 1) == 0){
                int can = 1 + (((n >> 1) * (n >> 1 >> 1) + ((n >> 1) + 1) * (n >> 1 >> 1)) << 1);
                if (can >= x) {
                    System.out.println(n);
                    break;
                }

            }
            else {
                int can = 1 + (((n >> 1) * (n >> 1 >> 1) + (((n >> 1) + 1) * ((n >> 1 >> 1) + 1))) << 1);
                if (can >= x) {
                    System.out.println(n);
                    break;
                }
            }

        }
    }
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Pr201A {
	public static void main(String[] args) throws IOException {
		new Pr201A().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st;

	String nextToken() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out, true);
		solve();
		out.flush();
	}

	void solve() throws IOException {
		int x = nextInt();
		int[] ds = new int[8];
		for (int i = 0; i < 8; i++) {
			ds[i] = ((2 * i + 1) * (2 * i + 1)) / 2 + 1;
		}

		if (x % 4 == 0 || x % 4 == 1) {
			int i = 0;
			while (i < 8 && ds[i] < x) {
				i++;
			}
			out.println(2 * i + 1);
			return;
		}
		if (x % 4 == 2) {
			out.println(x - 1);
			return;
		}
		out.println(2 * x - 1);
	}
}

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Crash
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
		int x = in.readInt();
		if (x == 1) {
			out.printLine(1);
			return;
		}
		for (int i = 3; ; i += 2) {
			int t = (i - 1) / 2;
			int p = (t * t + 1) / 2;
			if (p * 4 + 1 >= x) {
				out.printLine(i);
				return;
			}
		}
	}
}

class InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1000];
	private int curChar;
	private int numChars;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	private int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	private boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}
}

import java.util.*;
   public class Main{
   public static void main (String [] args){
          int n=0;
  Scanner in = new Scanner (System.in);

      int x = in.nextInt();

     if(x==1 || x==2){
  System.out.print("2");
}

     if(x>=3 && x<6)
   System.out.print("3");

  else if(x>=6 && x<=13)
    System.out.print("5");

 else if(x>=14 && x<=25)
    System.out.print("7");

  else if(x>=26 && x<=41)
    System.out.print("9");

   else if(x>=42 && x<=61)
    System.out.print("11");

    else if(x>=62 && x<=85)
    System.out.print("13");

    else if(x>=86 && x<=100)
    System.out.print("15");

}
}

import java.util.Arrays;
import java.util.Scanner;

public class ClearSymmetry202C {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x = in.nextInt();
		int[] max = new int[100];
		int[] min = new int[100];
		for (int i = 1; i < 100; i++) {
			if (i % 2 == 1) {
				max[i] = (i + 1) * (i + 1) / 2 - i;
				if (i > 1)
					min[i] = max[i - 2] + 2;
				else
					min[1] = 1;
			} else {
				max[i] = min[i] = max[i - 1] + 1;
			}
		}
		for (int i = 1; i < 100; i++)
			if (x >= min[i] && x <= max[i]) {
				System.out.println(i);
				return;
			}
	}
}

// package Practice2.CF200;

import java.util.Scanner;

public class CF201A {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        if(n == 3){
            System.out.println(5);
        }else{
            int i = 0;
            while((i * i+1)/2 < n){
                i++;
            }
            System.out.println(i);
        }
    }
}

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        InputStream inputStream=System.in;
        /*
        try{
            inputStream=new FileInputStream("input.txt");
        } catch (IOException e){throw new RuntimeException(e);}
        //*/
        OutputStream outputStream=System.out;
        InputReader in=new InputReader(inputStream);
        PrintWriter out=new PrintWriter(outputStream);
        Task solver=new Task();
        solver.run(in,out);
        out.close();
    }

}

class Task{
    public void run(InputReader in, PrintWriter out){
        int x=in.nextInt(),n,y,s;
        n=x/4;
        for (int i=1;i<=n;i++){
            y=(i*i+1)/2;
            s=(i/2);
            if (x%2==1) s=Math.max(0, s-1);
            if (x%4>1) s=Math.max(0, s-1);
            y+=s;
            if (y>=n) {out.println(i*2+1); return;}
        }
    }
}

class InputReader{
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream){
        reader=new BufferedReader(new InputStreamReader(stream));
        tokenizer=null;
    }
    public String next(){
        while (tokenizer==null||!tokenizer.hasMoreTokens()){
            try{
                tokenizer=new StringTokenizer(reader.readLine());
            } catch (IOException e){
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }
    public int nextInt(){
        return Integer.parseInt(next());
    }
}