import java.io.*;
import java.util.*;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Main implements Runnable {
    static final int MOD = (int) 1e9 + 7;
    static final int MI = (int) 1e9;
    static final long ML = (long) 1e18;
    static final Reader in = new Reader();
    static final PrintWriter out = new PrintWriter(System.out);
    StringBuilder answer = new StringBuilder();

    public static void main(String[] args) {
        new Thread(null, new Main(), "persefone", 1l << 32).start();
    }

    @Override
    public void run() {
        solve();
        printf();
        flush();
    }

    void solve() {
        int n = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();
        long[] dp = new long[n + 1];
        dp[1] = x;
        for (int i = 2; i <= n; i++) {
            dp[i] = dp[i - 1] + x;
            if (i % 2 == 0) {
                dp[i] = Math.min(dp[i], dp[i / 2] + y);
            } else {
                dp[i] = Math.min(dp[i], dp[(i + 1) / 2] + x + y);
            }
        }
        printf(dp[n]);

    }

    static class Graph {
        private int vertices;
        private List<Integer>[] adjacencies;
        private List<Integer> topo;
        private int[] dp;
        private int[] color;

        private boolean hasCycle;

        public Graph(int vertices) {
            this.vertices = vertices;
            this.adjacencies = Stream.generate(ArrayList::new).limit(vertices).toArray(List[]::new);
            this.topo = new ArrayList<>();
            this.color = new int[vertices];
            this.dp = new int[vertices];
        }

        public void addEdge(int from, int to) {
            adjacencies[from].add(to);
        }

        public void normalDfs(int from) {
            color[from] = 1;
            for (int to : adjacencies[from]) {
                if (color[to] == 0) {
                    normalDfs(to);
                }
            }
        }

        public void mainDfs(int from) {
            color[from] = 1;
            for (int to : adjacencies[from]) {
                if (color[to] == 0) {
                    mainDfs(to);
                } else if (color[to] == 1) {
                    hasCycle = true;
                    break;
                }
            }
            color[from] = 2;
            topo.add(from);
        }

        public void topoSort(int from) {
            mainDfs(from);
            Collections.reverse(topo);
        }

        public void topoSort() {
            for (int from = 0; from < vertices; from++) {
                if (color[from] == 0) {
                    mainDfs(from);
                }
            }
            Collections.reverse(topo);
        }

        public void resetColor() {
            Arrays.fill(color, 0);
        }

    }

    void printf() {
        out.print(answer);
    }

    void close() {
        out.close();
    }

    void flush() {
        out.flush();
    }

    void printf(Stream<?> str) {
        str.forEach(o -> add(o, " "));
        add("\n");
    }

    void printf(Object... obj) {
        printf(false, obj);
    }

    void printfWithDescription(Object... obj) {
        printf(true, obj);
    }

    private void printf(boolean b, Object... obj) {

        if (obj.length > 1) {
            for (int i = 0; i < obj.length; i++) {
                if (b) add(obj[i].getClass().getSimpleName(), " - ");
                if (obj[i] instanceof Collection<?>) {
                    printf((Collection<?>) obj[i]);
                } else if (obj[i] instanceof int[][]) {
                    printf((int[][]) obj[i]);
                } else if (obj[i] instanceof long[][]) {
                    printf((long[][]) obj[i]);
                } else if (obj[i] instanceof double[][]) {
                    printf((double[][]) obj[i]);
                } else printf(obj[i]);
            }
            return;
        }

        if (b) add(obj[0].getClass().getSimpleName(), " - ");
        printf(obj[0]);
    }

    void printf(Object o) {
        if (o instanceof int[])
            printf(Arrays.stream((int[]) o).boxed());
        else if (o instanceof char[])
            printf(new String((char[]) o));
        else if (o instanceof long[])
            printf(Arrays.stream((long[]) o).boxed());
        else if (o instanceof double[])
            printf(Arrays.stream((double[]) o).boxed());
        else if (o instanceof boolean[]) {
            for (boolean b : (boolean[]) o) add(b, " ");
            add("\n");
        } else
            add(o, "\n");
    }

    void printf(int[]... obj) {
        for (int i = 0; i < obj.length; i++) printf(obj[i]);
    }

    void printf(long[]... obj) {
        for (int i = 0; i < obj.length; i++) printf(obj[i]);
    }

    void printf(double[]... obj) {
        for (int i = 0; i < obj.length; i++) printf(obj[i]);
    }

    void printf(boolean[]... obj) {
        for (int i = 0; i < obj.length; i++) printf(obj[i]);
    }

    void printf(Collection<?> col) {
        printf(col.stream());
    }

    <T, K> void add(T t, K k) {
        if (t instanceof Collection<?>) {
            ((Collection<?>) t).forEach(i -> add(i, " "));
        } else if (t instanceof Object[]) {
            Arrays.stream((Object[]) t).forEach(i -> add(i, " "));
        } else
            add(t);
        add(k);
    }

    <T> void add(T t) {
        answer.append(t);
    }

    static class Reader {
        private BufferedReader br;
        private StringTokenizer st;

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

        Reader(String fileName) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(fileName));
        }

        boolean isReady() throws IOException {
            return br.ready();
        }

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

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

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

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

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

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

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class GenerateAString_Edu16 {
//	static int n, x, y;

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		x = sc.nextInt();
		y = sc.nextInt();
//		System.out.println(dijkstra(0, n));
		System.out.println(yamosahel());
	}

//	static int INF = 1000000000;

	static long[] dp;
	static long yamosahel()
	{
		dp = new long[n+1];
		for (int i = 1; i < dp.length; i++) {
			dp[i] = dp[i-1]+x;
			if(i%2==0){
				dp[i] = Math.min(dp[i], dp[i/2]+y);
			}
			else
				dp[i] = Math.min(dp[i],Math.min( dp[i/2] + y+x,  dp[(i+1)/2] + y+x));
		}
		return dp[n];
	}
//	static int n;
	static int n,x,y;
	static final long INF = (long)1e18;

	static class Pair implements Comparable<Pair>
	{
		int node;
		long time;
		Pair(int a, long b)
		{
			node = a; time = b;
		}

		public int compareTo(Pair p)
		{
			// time-p.time
			if(p.time!=time) return (time > p.time)? 1:-1;
			return node-p.node;
		}
		public String toString()
		{
			return node + " "+time;
		}
	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

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

		Scanner(FileReader r) {
			br = new BufferedReader(r);

		}

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

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

import java.io.*;
import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner input=new Scanner(System.in);
        int n=input.nextInt();
        long x=input.nextLong();
        long y=input.nextLong();
        System.out.println(solve(n,x,y));
    }
    static long solve(int n,long x,long y) {
        long dp[][]=new long[3][n+2];   //0->add    1->multiply     2->subtract
        for(int i=1;i<n+2;i++) {
            dp[0][i]=dp[1][i]=dp[2][i]=Long.MAX_VALUE-1;
            if(i%2==0) {
                dp[0][i]=Math.min(dp[0][i-1],dp[1][i-1])+x;
                dp[1][i]=Math.min(Math.min(dp[0][i/2],dp[1][i/2]),dp[2][i/2])+y;
            }
            else {
                dp[0][i]=Math.min(dp[0][i-1],dp[1][i-1])+x;
            }
            dp[2][i-1]=Math.min(dp[0][i], dp[1][i])+x;
        }
        return Math.min(Math.min(dp[0][n],dp[1][n]),dp[2][n]);
    }
}

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

public class Main {
	InputReader scn;
	PrintWriter out;
	String INPUT = "";

	void solve() {
		int n = scn.nextInt(), x = scn.nextInt(), y = scn.nextInt();
		long[] dp = new long[n + 1];
		dp[1] = x;
		for(int k = 2; k <= n; k++) {
			if(k % 2 == 0) {
				dp[k] = Math.min(x + dp[k - 1], y + dp[k / 2]);
			} else {
				dp[k] = Math.min(x + dp[k - 1], x + Math.min(dp[k / 2], dp[k / 2 + 1]) + y);
			}
		}
		out.println(dp[n]);
	}

	void run() throws Exception {
		boolean onlineJudge = System.getProperty("ONLINE_JUDGE") != null;
		out = new PrintWriter(System.out);
		scn = new InputReader(onlineJudge);
		long time = System.currentTimeMillis();
		solve();
		out.flush();
		if (!onlineJudge) {
			System.out.println(Arrays.deepToString(new Object[] { System.currentTimeMillis() - time + " ms" }));
		}
	}

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

	class InputReader {
		InputStream is;

		public InputReader(boolean onlineJudge) {
			is = onlineJudge ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		}

		byte[] inbuf = new byte[1024];
		public int lenbuf = 0, ptrbuf = 0;

		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++];
		}

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

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

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

		char nextChar() {
			return (char) skip();
		}

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

		char[] next(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);
		}

		int nextInt() {
			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();
			}
		}

		long nextLong() {
			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();
			}
		}

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

		int[] nextArray(int n, boolean isOneInd) {
			int k = isOneInd ? 1 : 0;
			int[] a = new int[n + k];
			for (int i = k; i < n + k; i++)
				a[i] = nextInt();
			return a;
		}

		int[] shuffle(int[] arr) {
			Random r = new Random();
			for (int i = 1, j; i < arr.length; i++) {
				j = r.nextInt(i);
				arr[i] = arr[i] ^ arr[j];
				arr[j] = arr[i] ^ arr[j];
				arr[i] = arr[i] ^ arr[j];
			}
			return arr;
		}
	}
}

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

public class GenerateString {
    static long[] dp;

    static class FastScanner {
        StringTokenizer st;
        BufferedReader br;

        FastScanner() {
            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();
        }

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

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

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

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

    public static void main(String[] Args) {
        FastScanner sc = new FastScanner();
        int n;
        int x;
        int y;
        n = sc.nextInt();
        x = sc.nextInt();
        y = sc.nextInt();
        dp = new long[n + 1];
        dp[0] = 0;
        dp[1] = x;
        for(int i = 2; i <= n; i++) {
            dp[i] = Math.min(x + dp[i - 1], (i % 2 == 1) ? (Math.min(dp[i / 2], dp[(i + 1) / 2]) + x + y) : (dp[i / 2] + y));
        }

        System.out.println(dp[n]);
    }
}

// CodeForces Educational Round 16 -- slowe

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

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

		int n = in.nextInt(), x = in.nextInt(), y = in.nextInt();
		long[] time = new long[n+1];
		time[1] = x;
		for(int i = 2; i <= n; i++)
			time[i] = Math.min(time[i-1] + x, time[(i+1)/2] + y + (i%2)*x);
		pw.println(time[n]);

		pw.flush();
		pw.close();
	}

	// if last move was add, subtract is pointless
	// if last move was double, subtraction may be helpful
	// if last move was subtract, previous move must have been double,
	//   so another subtraction yields foo-d-s-s for 2*foo-2
	//   which is equal to 2*(foo-1) from foo-s-d
	//   however, the latter is cheaper, so never subtract twice
	// thus only subtract after doubling

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

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

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

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

public class Main {

	static int p = 1000000007;
	static Mod mod = new Mod();
	//static int p = 998244353;

	public static void main(String args[]) throws IOException {
		Scanner sc = new Scanner();
		PrintWriter out = new PrintWriter(System.out);

		int t = 1;
		//t = sc.nextInt();

		while (t-- > 0) {

			long n=sc.nextInt(), x=sc.nextInt(), y=sc.nextInt(), dp[]=new long[(int)n+2];
			dp[1]=x;
			dp[2]=min(2*x,x+y);
			for(int i=2; 2*i<=n+1; i++) {
				dp[2*i] = min(dp[i]+y,dp[2*(i-1)]+2*x);
				dp[2*i-1] = min(dp[2*i],dp[2*(i-1)])+x;
			}
			out.print(dp[(int)n]);
		}
		out.flush();
	}

	static int count(int x, int[] arr) {
		int count = 0;

		for (int i = 0; i < arr.length; i++)
			if (arr[i] == x)
				count++;
		return count;
	}

	public static String reverseString(String str) {
		StringBuilder sb = new StringBuilder(str);
		sb.reverse();
		return sb.toString();
	}

	static boolean isPalindrome(String str) {
		int i = 0, j = str.length() - 1;

		while (i < j) {

			if (str.charAt(i) != str.charAt(j))
				return false;

			i++;
			j--;
		}
		return true;
	}

	static void print(int[] arr) {
		for (int i = 0; i < arr.length; i++)
			System.out.print(arr[i] + " ");
		System.out.println();
	}

	public static int abs(int x) {
		return ((x > 0) ? x : -x);
	}

	public static long abs(long x) {
		return ((x > 0) ? x : -x);
	}

	public static int max(int a, int b) {
		return Math.max(a, b);
	}

	public static long max(long a, long b) {
		return Math.max(a, b);
	}

	public static int min(int a, int b) {
		return Math.min(a, b);
	}

	public static long min(long a, long b) {
		return Math.min(a, b);
	}

	static int gcd(int a, int b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}

	static int modInverse(int a, int m) {
		int g = gcd(a, m);
		if (g != 1)
			return -1;
		else
			return power(a, m - 2, m);

	}

	// To compute x^y under modulo m
	static int power(int x, int y, int m) {
		if (y == 0)
			return 1;

		int p = power(x, y / 2, m) % m;
		p = (p * p) % m;

		if (y % 2 == 0)
			return p;
		else
			return (x * p) % m;
	}

	static int[] primeGenerator(int num) {
		int length = 0, arr[] = new int[num], a = num, factor = 1;
		if (num % 2 == 0) {
			while (num % 2 == 0) {
				num /= 2;
				factor *= 2;
			}
			arr[length++] = factor;
		}
		for (int i = 3; i * i <= a; i++) {
			factor = 1;
			if (num % i == 0) {
				while (num % i == 0) {
					num /= i;
					factor *= i;
				}
				arr[length++] = factor;
			}
		}
		if (num > 1)
			arr[length++] = num;
		return Arrays.copyOfRange(arr, 0, length);
	}

	static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;

		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;

		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;

		return true;
	}

	  static class Scanner { BufferedReader br; StringTokenizer st;

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

	  Scanner(String fileName) throws FileNotFoundException { br = new
	  BufferedReader(new FileReader(fileName)); }

	  String next() 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(next()); }

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

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

	  boolean ready() throws IOException { return br.ready(); }

	  }

	static void sort(int[] a) {
		shuffle(a);
		Arrays.sort(a);
	}

	static void shuffle(int[] a) {
		int n = a.length;
		Random rand = new Random();
		for (int i = 0; i < n; i++) {
			int tmpIdx = rand.nextInt(n);
			int tmp = a[i];
			a[i] = a[tmpIdx];
			a[tmpIdx] = tmp;
		}
	}
}

class Pair {
	int x;
	int y;

	Pair(int a, int b) {
		x = a;
		y = b;
	}

	void print() {
		System.out.println(this.x + " " + this.y);
	}
}

class Mod{
	static final int MOD = 998244353;

	int add(int x, int y){
		x += y;
	    while(x >= MOD) x -= MOD;
	    while(x < 0) x += MOD;
	    return x;
	}

	int subtract(int x, int y) {
		x -= y;
	    while(x >= MOD) x -= MOD;
	    while(x < 0) x += MOD;
	    return x;
	}

	int mul(int x, int y)
	{
		int result = (int)((long)x*y % MOD);
	    return result>=0?result:result+MOD;
	}

	int binpow(int x, int y)
	{
	    int z = 1;
	    while(y!=0)
	    {
	        if((y & 1)!=0)
	        	z = mul(z, x);
	        x = mul(x, x);
	        y >>= 1;
	    }
	    return z;
	}

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

	int divide(int x, int y)
	{
	    return mul(x, inv(y));
	}

	static final int N =200043;
	int[] fact;

	Mod() {
		fact = new int[N];
	}

	void precalc()
	{
	    fact[0] = 1;
	    for(int i = 1; i < N; i++)
	        fact[i] = mul(fact[i - 1], i);
	}

	int C(int n, int k)
	{
	    return divide(fact[n], mul(fact[k], fact[n - k]));
	}
}

/*
 * 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.
 */
/**
 *
 * @author ssaxena36 FI/O from @uwi
 */
import java.io.*;
import java.util.*;
public class TesttClass
{
   static ArrayList<Integer>list=new ArrayList<>();
   void solution()
    {
        //TesttClass oj=new TesttClass();
    //   oj.SieveOfEratosthenes(101000);
        // System.out.print(list);
        int n=inpi();
        int x=inpi();
        int y=inpi();
       long dp[]=new long[n+1];
       dp[0]=0;
       dp[1]=x;
       for(int i=2;i<=n;i++)
       {
           if(i%2==0)
           {
               dp[i]=Math.min(dp[i-1]+x, dp[i/2]+y);
           }
           else
           {
               dp[i]=Math.min(dp[i-1]+x, dp[(i+1)/2]+x+y);  //half and then add duplicate
           }
       }
       out.println(dp[n]);
        /*long sum=sum(arr);
        sum=sum/n;
       // out.println(sum+"-->");
        int x=Collections.binarySearch(arr, sum);
        if(x>=0)
        {
            out.println(sum);
        }
        else
        {
            x=Math.abs(x+1);
         //  out.println(x);
            if(x==0)
            {
                out.println(arr.get(0));
            }
            else
            {
                out.println(arr.get(x));
            }
        }
                */
    }
   public long sum(ArrayList<Long> arr)
   { long s=0;
       for(int i=0;i<arr.size();i++)
       {
           s+=arr.get(i);
       }
       return s;
   }
   public void SieveOfEratosthenes(int n)
{
    boolean prime[]=new boolean[n+1];
    Arrays.fill(prime, true);
    for (int p=2; p*p<=n; p++)
    {
        if (prime[p] == true)
        {
            for (int i=p*2; i<=n; i += p)
                prime[i] = false;
        }
    }
    // Print all prime numbers
    for (int p=2; p<=n; p++)
    { if (prime[p])
    {
      //  System.out.print(p+" ");
        list.add(p);
    }
}
   // return list;
}

    InputStream obj;
    PrintWriter out;
    String check="";
    public static void main(String[] args)throws IOException{
        new TesttClass().main1();
    }
    void main1()throws IOException{
        out=new PrintWriter(System.out);
        obj=check.isEmpty() ? System.in : new ByteArrayInputStream(check.getBytes());
       solution();
        out.flush();
        out.close();
    }
    byte inbuffer[]=new byte[1024];
    int lenbuffer=0,ptrbuffer=0;
    int readByte(){
        if(lenbuffer==-1)
            throw new InputMismatchException();
        if(ptrbuffer>=lenbuffer)
        {
            ptrbuffer=0;
            try {
                lenbuffer=obj.read(inbuffer);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
        }
        if(lenbuffer<=0)
            return -1;
        return inbuffer[ptrbuffer++];
    }
    boolean isSpaceChar(int c)
    {
        return (!(c>=33 && c<=126));
    }
    int skip()
    {
        int b;
        while((b=readByte())!=-1 && isSpaceChar(b));
        return b;
    }
    String inps()
    {
        int b=skip();
        StringBuilder sb=new StringBuilder();
        while(!(isSpaceChar(b)))
        {
            sb.appendCodePoint(b);
            b=readByte();
        }
        return sb.toString();
    }
    int inpi()
    {
        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();
        }
    }
    long inpl()
    {
        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();
        }
    }
    float inpf()
    {
        return Float.parseFloat(inps());
    }
    double inpd()
    {
        return Double.parseDouble(inps());
    }
    char inpc()
    {
        return (char)skip();
    }
    int[] inpia(int n)
    {
        int a[]=new int[n];
        for(int i=0;i<n;i++)
            a[i]=inpi();
        return a;
    }
    long[] inpla(int n)
    {
        long a[]=new long[n];
        for(int i=0;i<n;i++)
            a[i]=inpl();
        return a;
    }
    String[] inpsa(int n)
    {
        String a[]=new String[n];
        for(int i=0;i<n;i++)
            a[i]=inps();
        return a;
    }
    double[][] inpdm(int n, int m)
    {
        double a[][]=new double[n][m];
        for(int i=0;i<n;i++)
            for(int j=0;j<m;j++)
                a[i][j]=inpd();
        return a;
    }
    int[][] inpim(int n, int m)
    {
        int a[][]=new int[n][m];
        for(int i=0;i<n;i++)
            for(int j=0;j<m;j++)
                a[i][j]=inpi();
        return a;
    }
}

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

public class Main {

	public static void main(String[] args) {
		InputStream inputStream = System.in;
		InputReader in = new InputReader(inputStream);
		int n = in.nextInt();
		long x = in.nextLong();
		long y = in.nextLong();
		long[] dp = new long[10000001];
		dp[1] = x;
		for (int i = 2; i <= n; i++){
			dp[i] = Math.min(dp[i - 1] + x, dp[(i + 1) / 2] + y + (i % 2) * x);
		}
		System.out.print(dp[n]);

	}

	static 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 int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong(){
			return Long.parseLong(next());
		}

	}

}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {

	static class Task {

		int NN = 10000007;
		int MOD = 1000000007;
		int INF = 2000000000;
		long INFINITY = 2000000000000000000L;

		long [] dp = new long[NN];
		long x, y;

		long rec(int n) {
			if(dp[n] != -1)
				return dp[n];
			if(n == 1)
				return dp[n] = x;
			return dp[n] = Math.min(rec(n - 1) + x,
					rec((n+1)/2)+y+(n%2==0?0:1)*x);
		}

		public void solve(InputReader in, PrintWriter out) {
			int n = in.nextInt();
			x = in.nextLong();
			y = in.nextLong();
			dp[1] = x;
			for(int i=2;i<=n;++i) {
				dp[i] = Math.min(dp[i-1]+x, dp[(i+1)/2]+y+(i%2==0?0:1)*x);
			}
			out.println(dp[n]);
		}
	}

	static void prepareIO(boolean isFileIO) {
		//long t1 = System.currentTimeMillis();
		Task solver = new Task();
		// Standard IO
		if(!isFileIO) {
			InputStream inputStream = System.in;
	        OutputStream outputStream = System.out;
	        InputReader in = new InputReader(inputStream);
	        PrintWriter out = new PrintWriter(outputStream);
	        solver.solve(in, out);
	        //out.println("time(s): " + (1.0*(System.currentTimeMillis()-t1))/1000.0);
	        out.close();
		}
        // File IO
		else {
			String IPfilePath = System.getProperty("user.home") + "/Downloads/ip.in";
	        String OPfilePath = System.getProperty("user.home") + "/Downloads/op.out";
	        InputReader fin = new InputReader(IPfilePath);
	        PrintWriter fout = null;
	        try {
				fout = new PrintWriter(new File(OPfilePath));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
	        solver.solve(fin, fout);
	        //fout.println("time(s): " + (1.0*(System.currentTimeMillis()-t1))/1000.0);
	        fout.close();
		}
	}

	public static void main(String[] args) {
        prepareIO(false);
	}

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

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

        public InputReader(String filePath) {
        	File file = new File(filePath);
            try {
				reader = new BufferedReader(new FileReader(file));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
            tokenizer = null;
        }

        public String nextLine() {
        	String str = "";
        	try {
				str = reader.readLine();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
        	return str;
        }

        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());
        }

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

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

    }

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
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);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();

            long[] dp = new long[n + 1];
            for (int i = 1; i <= n; i++) {
                dp[i] = dp[i - 1] + x;
                if (i % 2 == 0) {
                    dp[i] = Math.min(dp[i], dp[i / 2] + y);
                } else {
                    dp[i] = Math.min(dp[i], dp[(i + 1) / 2] + y + x);
                }
            }
            out.println(dp[n]);
        }

    }

    static 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();
            } catch (IOException e) {
                return null;
            }
        }

        public String next() {
            while (stt == null || !stt.hasMoreTokens()) {
                stt = new StringTokenizer(nextLine());
            }
            return stt.nextToken();
        }

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

    }
}

//package olymp_prog;

import java.util.Scanner;

/**
 * Created by Максим on 08.01.2017.
 */
public class E710 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long x, y;
        x = in.nextLong();
        y = in.nextLong();
        int oldn = n;
        n = 2 * n;
        long a[] = new long[n + 1];
        a[1] = x;
        for (int i = 2; i < n + 1; i++) {
            a[i] = a[i - 1] + x;
            if (i % 2 == 0) {
                int j = i;
                a[i] = Math.min(a[i], a[i / 2] + y);
                while (j >= i / 2 && a[j - 1] > a[j] + x) {
                    a[j - 1] = a[j] + x;
                    j--;
                }
            }
        }
        System.out.println(a[oldn]);
    }
}

import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.util.PriorityQueue;
public class E {
	public static void main(String args[]) {
		Sc sc = new Sc(System.in);
		long t = 0;
		int n = sc.nI();
		int x = sc.nI();
		int y = sc.nI();
		long[] time = new long[n+10];
		time[1] = x;
		time[2] = Math.min(2*x,x+y);
		for(int i = 4; i<=n+1; i+=2) {
			time[i] = time[i/2] + y;
			time[i-1] = Math.min(time[i] + x,time[i-2] + x);
			time[i] = Math.min(time[i],time[i-1] + x);
		}

		System.out.println(time[n]);

	}
}
class Sc {
    public Sc(InputStream i) {
        r = new BufferedReader(new InputStreamReader(i));
    }

    public boolean hasM() {
        return peekToken() != null;
    }

    public int nI() {
        return Integer.parseInt(nextToken());
    }

    public double nD() {
        return Double.parseDouble(nextToken());
    }

    public long nL() {
        return Long.parseLong(nextToken());
    }

    public String n() {
        return nextToken();
    }

    private BufferedReader r;
    private String line;
    private StringTokenizer st;
    private String token;

    private String peekToken() {
        if (token == null)
            try {
                while (st == null || !st.hasMoreTokens()) {
                    line = r.readLine();
                    if (line == null) return null;
                    st = new StringTokenizer(line);
                }
                token = st.nextToken();
            } catch (IOException e) { }
        return token;
    }

    private String nextToken() {
        String ans = peekToken();
        token = null;
        return ans;
    }
}

import java.util.Scanner;

/**
 * Created by zqin on 2016/8/22.
 */
public class E_GenerateaString {

//    public static void main(String []args){
//        Scanner scanner = new Scanner(System.in);
//
//        while (scanner.hasNext()){
//            int n  = scanner.nextInt(); int x = scanner.nextInt(); int y = scanner.nextInt();
//
//            double [] a = new double[2*n+1];
//
//            for(int i = 1;i <=n;i++){
//                if(a[i] == 0) a[i]  = i*x;
//
//
//                if(a[i] > i*x) a[i] = i*x;
//
//                    if(a[2*i] == 0)
//                        a[2*i] = a[i] + y;
//                else{
//                        if(a[2*i] > a[i] + y) a[2*i] = a[i] + y;
//                    }
//                    int t = 2*i;double last = a[2*i];
//                    while(t > 0) {
//                        if(a[t] == 0 || a[t] > last){
//
//                            a[t] = last;
//                        }
//
//                        last += x;
//                        t--;
//                    }
//
//                t = 2*i;last = a[2*i];
//                while(t <= 2*n){
//                    if(a[t] == 0 || a[t] > last){
//                        a[t] = last;
//                    }
//
//                    last += x;
//                    t++;
//                }
//
//            }
//
//            System.out.println(a[n]);
//        }
//    }
/*
traditional dp, use dp[i] to represent the minimum effort to get i a. if i is odd, it can be obtained by i-1 a add one or i+1 a min one.
if i is even, other the situation above, it can get by double i/2 (a[i/2]+y)
*/

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

        while (scanner.hasNext()){
            int n  = scanner.nextInt(); int x = scanner.nextInt(); int y = scanner.nextInt();
            long [] a= new long[n+2]; a[0] = 0;
            for(int i = 1;i < n+2;i++){
                if(a[i] == 0) a[i] = a[i-1]+x;
                else a[i] = Math.min(a[i],a[i-1]+x);
                if((i&1) == 0){
                    if(a[i/2]+y < a[i]) a[i] = a[i/2]+y;
                }
                if(a[i]+x < a[i-1]) a[i-1] = a[i]+x;
            }
            System.out.println(a[n]);
        }
    }
}

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

public class GenerateAString {
    public static long INF = Long.MAX_VALUE/2;
    public static void main(String[] args) throws IOException{
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        StringTokenizer st = new StringTokenizer(f.readLine());
        int n = Integer.parseInt(st.nextToken());
        long x = Long.parseLong(st.nextToken());
        long y = Long.parseLong(st.nextToken());
        long[] dp = new long[n+1];
        Arrays.fill(dp, INF);
        dp[0] = 0;
        for(int i = 0; i < n; i++){
            dp[i+1] = Math.min(dp[i+1], dp[i]+x);
            if(2*i <= n){
                dp[2*i] = Math.min(dp[2*i],dp[i]+y);
            }
            if((2*i)-1 <= n && (2*i)-1 >= 0){
                dp[(2*i)-1] = Math.min(dp[(2*i)-1],dp[i]+x+y);
            }
        }
        out.println(dp[n]);
        out.close();
    }
}

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

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

    private void solve() {
        Scanner scanner = new Scanner(System.in);
        PrintWriter writer = new PrintWriter(System.out);

        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        scanner.close();
        long[] d = new long[n + 1];

        d[1] = x;
        for (int i = 2; i <= n; i++) {
            d[i] = Math.min(d[i - 1] + x, d[(i + 1) / 2] + y + x * (i % 2));
        }
        writer.print(d[n]);
        writer.close();
    }
}

import javax.swing.*;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;

public class Test {

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        int target = in.nextInt();
        long addCost = in.nextInt(), doubleCost = in.nextInt();
        long[] best = new long[target+1];
        Arrays.fill(best, Long.MAX_VALUE);
        best[0] = 0;
        for (int i = 1; i <= target; i++) {
            best[i] = best[i-1]+addCost;
            if (i % 2 == 0) best[i] = Math.min(best[i], best[i/2]+doubleCost);
            int cur = i;
            while (best[cur - 1] > best[cur]+addCost) {
                best[--cur] = best[cur+1]+addCost;
            }
        }
        for (int i = 1; i < target; i++) {
            if (i*2 > target) best[target] = Math.min(best[target], best[i]+doubleCost + addCost*(i*2-target));
        }
        //System.out.println(Arrays.toString(best));
        System.out.println(best[target]);
    }

    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(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 int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public double nextDouble() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E') {
                    return res * Math.pow(10, nextInt());
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = snext();
            }
            if (c == '.') {
                c = snext();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E') {
                        return res * Math.pow(10, nextInt());
                    }
                    if (c < '0' || c > '9') {
                        throw new InputMismatchException();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = snext();
                }
            }
            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 String nextLine() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isEndOfLine(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;
        }

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

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

}

//package CF;

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

public class A {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt(), x = sc.nextInt(), y = sc.nextInt();
		long [] dp = new long[n+10];
		dp[1] = x;
		for (int i = 2; i < dp.length; i++) {
			dp[i] = dp[i-1] + x;
			if((i & 1) != 0){
				dp[i] = Math.min(dp[i], dp[(i+1)>>1] + x + y);
			}
			else{
				dp[i] = Math.min(dp[i], dp[i>>1] + y);
			}
		}
		out.println(dp[n]);
		out.flush();
		out.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

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

		public Scanner(FileReader fileReader) {
			br = new BufferedReader(fileReader);
		}

		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 boolean ready() throws IOException {
			return br.ready();
		}
	}
}

/* package codechef; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{

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

		int n = in.nextInt();
		long x = in.nextInt();
		long y = in.nextInt();

		long[] dp = new long[n+1];
		dp[1] = x;

		for(int i = 1; i < n; i++) {

		    if(dp[i] == 0) continue;
		    if(dp[i+1] == 0) {
		        dp[i+1] = dp[i] + x;
		    }else {
		        dp[i+1] = Math.min(dp[i+1], dp[i]  + x);
		    }

		    if(i >= 2 && i*2 - 1 <= n) {
		        if(dp[2*i - 1] == 0) dp[2*i - 1] = dp[i]+x+y;
		        else {
		             dp[i*2 -1 ] = Math.min(dp[i*2 -1] , dp[i] + x+y);;
		        }
		    }

		    if(i*2 <= n)  {
    		    if(dp[2*i] == 0) dp[2*i] = dp[i] + y;
    		    else {
    		        dp[2*i] = Math.min(dp[i] + y, dp[2*i]);
    		    }
		    }

		}

		System.out.println(dp[n]);
	}

}

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

public class ETask {

    public static void main(String[] args) throws IOException {
        MyInputReader in = new MyInputReader(System.in);
        int n = in.nextInt();
        long x = in.nextInt();
        long y = in.nextInt();
        long[] dp = new long[n + 1];
        dp[1] = x;
        for (int i = 2; i < n + 1; i++) {
            if (i % 2 == 0) {
                dp[i] = Math.min(dp[i - 1] + x, dp[i / 2] + y);
            } else {
                dp[i] = Math.min(dp[(i + 1) / 2] + x + y, dp[i - 1] + x);
            }
        }
        System.out.println(dp[n]);
    }

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

        public MyInputReader(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 int nextInt() {
            return Integer.parseInt(next());
        }
    }

}

import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    static long inf = (long)1e18,x,y;
    static long [] dp;

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;

        tk = new StringTokenizer(in.readLine());
        int n = parseInt(tk.nextToken());
        x = parseLong(tk.nextToken());
        y = parseLong(tk.nextToken());

        dp = new long[2*n+2];
        Arrays.fill(dp, inf);

        dp[1] = x;
        for(int j=0; j<6; j++) {
            for(int i=1; i<=2*n; i++) {
                dp[i+1] = min(dp[i+1], dp[i]+x);
                dp[i-1] = min(dp[i-1], dp[i]+x);
                if(2*i <= 2*n)
                    dp[2*i] = min(dp[2*i], dp[i]+y);
            }
        }
        //for(int i=2; i<=2*n; i++)
            //dp[i-1] = min(dp[i-1], dp[i]+x);

        System.out.println(dp[n]);
    }

    static long calc(int n) {
        if(n==1)
            return x;

        if(dp[n]!=-1)
            return dp[n];

        long ans = calc(n-1)+x;
        if(n%2==0)
            ans = min(ans, calc(n/2)+y);
        else ans = min(ans, calc((n-1)/2)+x+y);

        return dp[n] = ans;
    }
}

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

public class Main {
    public static void main(String[] args) throws IOException{
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long X = sc.nextLong();
        long Y = sc.nextLong();
        Sol sol = new Sol(N, X, Y);
        sol.solve();
    }
}

class Sol {
    long N, X, Y;
    long[] res;

    Sol(long N, long X, long Y){
        this.N = N;
        this.X = X;
        this.Y = Y;
        res = new long[(int)N+1];
        res[1] = X;
        if(N >= 2)
            res[2] = (X<<1) < (X+Y) ? (X<<1) : (X+Y);
    }

    long rec(long x){
        if(res[(int)x] > 0){
            return res[(int)x];
        }

        if((x&1)==1){
            long t1 = rec(x-1) + X;
            long t2 = rec((x+1)>>1) + X + Y;
            return res[(int)x] = t1 < t2 ? t1 : t2;
        }
        else {
            long min = (x>>1)*X;
            min = (Y < min ? Y : min);
            return res[(int)x] = rec(x>>1)+min;
        }
    }

    void solve(){
        System.out.println(rec(N));
    }
}

/**
 * Created by Valeriy Belaventsev on 22.08.2016.
 */
import java.io.*;
import java.util.Arrays;
import java.util.Locale;
import java.util.StringTokenizer;

public class ProblemE {
    //String fileName = "<name>";

    public void solve() throws IOException {
        int n = nextInt();
        int x = nextInt();
        int y = nextInt();
        long[] dp = new long[n + 10];
        dp[0] = 0;
        dp[1] = x;
        dp[2] = Math.min(2 * x, x + y);
        for (int i = 3; i < n + 5; i += 2) {
            dp[i + 1] = Math.min(dp[i - 1] + 2 * x, dp[(i + 1) / 2] + y);
            dp[i] = Math.min(dp[i - 1], dp[i + 1]) + x;
        }
        out.println(dp[n]);
        //out.println(Arrays.toString(dp));
    }

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

            solve();

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

    BufferedReader br;
    StringTokenizer in;
    PrintWriter out;

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

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

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

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

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new ProblemE().run();
    }

}

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

import javax.management.RuntimeErrorException;

public class Main{

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

		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(bf.readLine());
		int n=Integer.parseInt(st.nextToken());
		int x=Integer.parseInt(st.nextToken());
		int y=Integer.parseInt(st.nextToken());
		long arr[]=new long[n+1];

		arr[1]=x;

		for(int i=2;i<arr.length;i++)
		{
			if(i%2==0)
			arr[i]=Math.min(arr[i/2] + y, arr[i-1]+x);
			else
			arr[i]=Math.min(Math.min(arr[i/2] + y+ x,arr[i-1]+x),arr[(i+1)/2]+ y + x);
		}

		System.out.println(arr[n]);
	}
}

import com.sun.org.apache.bcel.internal.generic.FieldGen;

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);
        }
    }

    void solve() throws IOException {
        int n = readInt();
        int x = readInt();
        int y = readInt();
        long[] dp = new long[n + 1];
        for (int i=1;i<=n;i++) {
            dp[i] = dp[i - 1] + x;
            if (i % 2 == 0) {
                dp[i] = Math.min(dp[i], dp[i / 2] + y);
            } else {
                dp[i] = Math.min(dp[i], Math.min(dp[(i / 2) + 1], dp[i / 2]) + x + y);
            }
        }
        out.println(dp[n]);
    }

}

//package com.codeforces.competitions.educational.year2016.round16;

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

public final class TaskE implements Runnable
{
	public static void main(String[] args)
	{
		try
		{
			Thread thread = new Thread(null, new TaskE(), "TaskE", 1 << 29);

			thread.start();
			thread.join();
		}
		catch (InterruptedException e)
		{
			e.printStackTrace();
		}
	}

	@Override public void run()
	{
	}

	public TaskE()
	{
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);

		Solver solver = new Solver(in, out);
		solver.solve();

		out.flush();

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

	static class Solver
	{
		static final long INFINITY = Long.MAX_VALUE;
		int n;
		long x, y;
		long[] dp;
		InputReader in;
		OutputWriter out;

		void solve()
		{
			n = in.nextInt();
			x = in.nextInt();
			y = in.nextInt();
			dp = new long[2 * n + 1];

			Arrays.fill(dp, INFINITY);

			dp[0] = 0;
			dp[1] = x;

			for (int i = 2; i <= n; i++)
			{
				long min = INFINITY;

				// if this count was reached by adding 1
				min = Math.min(min, dp[i - 1] + x);

				// if this count was reached by doubling
//				if ((i & 1) > 0)
				if (i % 2 == 1)
				{
					min = Math.min(min, dp[i / 2] + y + x);
					min = Math.min(min, dp[i / 2 + 1] + y + x);
				}
				else
					min = Math.min(min, dp[i / 2] + y);

				dp[i] = min;
			}

			out.println(dp[n]);

//			out.println(find(1) + x);
		}

		long find(int created)
		{
			if (created > n)
				return /*dp[created] = */(long) (created - n) * x;

			if (dp[created] != INFINITY)
				return dp[created];

			if (created == n)
				return 0;

			System.out.println("created : " + created);

			long min = INFINITY;

			min = Math.min(min, (n - created) * x);
			min = Math.min(min, find(created + 1) + x);
			min = Math.min(min, find(created << 1) + y);
//			min = Math.min(min, find(created - 1) + x);

			if (created > 2)
				min = Math.min(min, find((created - 1) << 1) + x + y);

			min = Math.min(min, (n - created) * x);
			dp[created] = min;

			return min;
		}

		public Solver(InputReader in, OutputWriter 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() // problematic
		{
			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() // not completely accurate
		{
			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();
			}
		}

	}

	static class OutputWriter
	{
		private PrintWriter writer;

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

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

		public void println(int x)
		{
			writer.println(x);
		}

		public void print(int x)
		{
			writer.print(x);
		}

		public void println(char x)
		{
			writer.println(x);
		}

		public void print(char x)
		{
			writer.print(x);
		}

		public void println(int array[], int size)
		{
			for (int i = 0; i < size; i++)
				println(array[i]);
		}

		public void print(int array[], int size)
		{
			for (int i = 0; i < size; i++)
				print(array[i] + " ");
		}

		public void println(long x)
		{
			writer.println(x);
		}

		public void print(long x)
		{
			writer.print(x);
		}

		public void println(long array[], int size)
		{
			for (int i = 0; i < size; i++)
				println(array[i]);
		}

		public void print(long array[], int size)
		{
			for (int i = 0; i < size; i++)
				print(array[i]);
		}

		public void println(float num)
		{
			writer.println(num);
		}

		public void print(float num)
		{
			writer.print(num);
		}

		public void println(double num)
		{
			writer.println(num);
		}

		public void print(double num)
		{
			writer.print(num);
		}

		public void println(String s)
		{
			writer.println(s);
		}

		public void print(String s)
		{
			writer.print(s);
		}

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

		public void printSpace()
		{
			writer.print(" ");
		}

		public void printf(String format, Object args)
		{
			writer.printf(format, args);
		}

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

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

	}

}

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

public class E {

	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
	public static void main(String[] args) throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = nextInt();
		long x = nextInt();
		long y = nextInt();
		long[]dp = new long[n+1];
		for (int i = 1; i <= n; i++) {
			dp[i] = dp[i-1] + x;
			if (i % 2==0)
				dp[i] = Math.min(dp[i], dp[i/2] + y);
			else
				dp[i] = Math.min(dp[i], dp[i/2+1] + y + x);
		}
		System.out.println(dp[n]);
		pw.close();
	}
	private static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	private static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
	private static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}
	private static String next() throws IOException {
		while (st==null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}
}

import java.util.Scanner;

/**
 * Created by huang on 17-5-27.
 */
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), x = in.nextInt(), y = in.nextInt();
        long[] dp = new long[n+1];
        dp[1] = x;
        for (int i = 2; i <= n; i++) {
            dp[i] = dp[i-1] + x;
            if ((i&1) == 0) {
                dp[i] = Math.min(dp[i], dp[i>>1]+y);
            }
            else {
                dp[i] = Math.min(dp[i], dp[(i+1)>>1]+y+x);
            }
        }
        System.out.println(dp[n]);

    }
}

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

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

	FastReader in = new FastReader();
	PrintWriter out = new PrintWriter(System.out);
	void run(){
		work();
		out.flush();
	}
	long mod=998244353;
	long gcd(long a,long b) {
		return a==0?gcd(b%a,a):b;
	}
	//偶数，*2是最后一步
	void work() {
		int n=ni();
		long a=nl(),b=nl();
		long[] dp=new long[n+3];
		dp[1]=a;
		dfs(dp,n,a,b);
		out.println(dp[n]);
	}

	private long dfs(long[] dp, int k,long a,long b) {
		if(dp[k]>0)return dp[k];
		if(k%2==1) {
			dp[k]=Math.min(dfs(dp,k-1,a,b), dfs(dp,k+1,a,b))+a;
		}else {
			dp[k]=Math.min(dfs(dp,k/2,a,b)+b, a*k);
		}
		return dp[k];
	}
	//input
	private ArrayList<Integer>[] ng(int n, int m) {
		ArrayList<Integer>[] graph=(ArrayList<Integer>[])new ArrayList[n];
		for(int i=0;i<n;i++) {
			graph[i]=new ArrayList<>();
		}
		for(int i=1;i<=m;i++) {
			int s=in.nextInt()-1,e=in.nextInt()-1;
			graph[s].add(e);
			graph[e].add(s);
		}
		return graph;
	}

	private int ni() {
		return in.nextInt();
	}

	private long nl() {
		return in.nextLong();
	}

	private long[] na(int n) {
		long[] A=new long[n];
		for(int i=0;i<n;i++) {
			A[i]=in.nextLong();
		}
		return A;
	}
	private int[] nia(int n) {
		int[] A=new int[n];
		for(int i=0;i<n;i++) {
			A[i]=in.nextInt();
		}
		return A;
	}
}

class FastReader
{
	BufferedReader br;
	StringTokenizer st;

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

	public String next()
	{
		while(st==null || !st.hasMoreElements())//回车，空行情况
		{
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return st.nextToken();
	}

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

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

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

public class Main {

    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int x = Integer.parseInt(st.nextToken());
        int y = Integer.parseInt(st.nextToken());
        long[] arr = new long[n+1];
        arr[0] = 0;
        arr[1] = x;
        for(int i = 2; i<=n; i++){
            if((i&1) == 0){
                arr[i] = Math.min(arr[i-1]+x, y+arr[i/2]);
            }
            else{
                arr[i] = Math.min(arr[i-1]+x, x+y+arr[i/2+1]);
            }
        }
        System.out.println(arr[n]);
    }
}

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

public class Main {

    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int x = Integer.parseInt(st.nextToken());
        int y = Integer.parseInt(st.nextToken());
        long[] arr = new long[n+1];
        arr[0] = 0;
        arr[1] = x;
        for(int i = 2; i<=n; i++){
            if((i&1) == 0){
                arr[i] = Math.min(arr[i-1]+x, y+arr[i/2]);
            }
            else{
                arr[i] = Math.min(arr[i-1]+x, Math.min(x+y+arr[i/2], x+y+arr[i/2+1]));
            }
        }
        System.out.println(arr[n]);
    }
}

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.Scanner;

public class GenerateString2 {

	static Scanner in = new Scanner(System.in);

	public static void main(String[] args) {
		int n = in.nextInt();
		int x = in.nextInt();
		int y = in.nextInt();

		System.out.println(solve(n, x, y));
	}

	public static long solve(int n, int x, int y){
		long[]dp = new long[n+3];

		dp[0]=0;

		for(int i=1; i<=n; i++){
			if (i%2==0){
				dp[i]=Math.min(x+dp[i-1], y+dp[i/2]);
			} else{
				dp[i]=Math.min(x+dp[i-1], x+y+dp[(i+1)/2]);
			}
		}

		return dp[n];
	}

	static class InputReader {

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

		public InputReader(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 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 = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(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;
		}

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

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

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

}

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

public class Cf710E {

    public static void main(String args[]) throws IOException
    {
        InputReader in = new InputReader(System.in);
	PrintWriter w = new PrintWriter(System.out);
        int n, x, y;
        n = in.nextInt();
        x = in.nextInt();
        y = in.nextInt();
        long ans[] = new long[n+1];
        ans[1] = x;

        for(int i = 2; i <= n; i++){
            //ans[i] = ans[i-1] + x;
            if(i%2 == 0){
                ans[i] = Math.min(ans[i-1] + x, ans[i/2] + y);
            } else {
                ans[i] = Math.min(ans[i-1] + x, ans[(i+1)/2] + y + x);
            }
        }
        w.println(ans[n]);

        w.close();
    }

      static class InputReader {

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

		public InputReader(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 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 = 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);
		}
	}
}

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
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 E {

    public static void main(String args[]) {
        E e = new E();
        e.solve(System.in, System.out);
    }

    public void solve(InputStream in, OutputStream out) {
        InputReader inputReader = new InputReader(in);
        PrintWriter writer = new PrintWriter(new BufferedOutputStream(out));

        int n = inputReader.nextInt();
        long x = inputReader.nextLong();
        long y = inputReader.nextLong();

        writer.write(solve(n, x, y) + "\n");
        writer.close();
    }

    public long solve(int n, long x, long y) {
        long d[] = new long[n + 1];
        d[0] = 0;
        for (int i = 1; i <= n; i++) {
            d[i] = Long.MAX_VALUE;
        }

        for (int i = 1; i <= n; i++) {
            d[i] = Math.min(d[i], d[i - 1] + x);
            if (i % 2 == 0) {
                d[i] = Math.min(d[i], d[i / 2] + y);
            } else {
                d[i] = Math.min(d[i], d[(i + 1) / 2] + x + y);
            }
        }

        return d[n];
    }

    private static 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 int nextInt() {
            return Integer.parseInt(next());
        }

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

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

import java.util.*;
import java.io.*;
public class EdC {

	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
 		StringTokenizer st = new StringTokenizer(bf.readLine());
 		long n = Long.parseLong(st.nextToken());
 		long x = Long.parseLong(st.nextToken());
 		long y = Long.parseLong(st.nextToken());
 		long[] dp = new long[(int)(n+2)];
 		for(int j = 1;j<dp.length;j++){
 			long temp = j;
 			dp[j] = x*j;
 			long count = 0;
 			while(temp%2 == 0){
 				temp/=2;
 				count++;
 				dp[j] = Math.min(dp[j],  temp*x+y*count);
 			}
 		}
 		dp[1] = x;
 		for(int j = 2;j<dp.length;j++){
 			if (j%2 == 0)
 				dp[j] = Math.min(dp[j], dp[j/2]+y);
 			else
 				dp[j] = Math.min(dp[j] , Math.min(dp[(j+1)/2]+x+y, dp[(j-1)/2]+x+y));

 		}

 		out.println(dp[(int)(n)]);

 		out.close();

 	}
}

//StringJoiner sj = new StringJoiner(" ");
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is

import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

/**
 */
public class Main710E {
	public static void main(String[] args) {
		run(System.in, System.out);
	}

	public static void run(InputStream in, PrintStream out) {

		try (Scanner sc = new Scanner(in)) {
			int n = sc.nextInt();
			int x = sc.nextInt();
			int y = sc.nextInt();

			long[] dp = new long[n + 1];

			dp[0] = 0;
			dp[1] = x;

			int i = 2;
			while (i <= n) {
				if (i % 2 == 0) {
					dp[i] = min(dp[i - 1] + x, dp[i / 2] + y);
				} else {
					dp[i] = min(dp[i - 1] + x, dp[(i + 1) / 2] + x + y);
				}
				i++;
			}
			out.print(dp[n]);
		}
	}

	private static long min(long i, long j) {
		return i < j ? i : j;
	}

}

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.LinkedList;
import java.util.Queue;
public class E1 {
	 public static void main(String[]args)throws IOException,NumberFormatException{
		 BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
		 String s=bf.readLine();
		 String[]sa=s.split(" ");
		 int n=Integer.parseInt(sa[0]);
		 int c1=Integer.parseInt(sa[1]);
		 int c2=Integer.parseInt(sa[2]);
		 long[]cost=new long[n+1];
		 cost[1]=c1;
		 for(int i=2;i<=n;i++)
			 if(i%2==0)
				 cost[i]=Math.min(cost[i-1]+c1, cost[i/2]+c2);
			 else
				 cost[i]=Math.min(cost[i-1]+c1, cost[(i+1)/2]+c2+c1);
		 System.out.println(cost[n]);
	 }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
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 aryssoncf
 */
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);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            try {
                int n = in.readInt(), x = in.readInt(), y = in.readInt();
                long[] memo = ArrayUtils.createArray(n + 1, -1L);
                long res = dp(n, x, y, memo);
                out.printLine(res);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        long dp(int n, int x, int y, long[] memo) {
            if (memo[n] != -1) {
                return memo[n];
            }
            if (n <= 1) {
                return memo[n] = n * x;
            }
            if (n % 2 == 0) {
                return memo[n] = dp(n / 2, x, y, memo) + Math.min(y, (long) n / 2 * x);
            }
            return memo[n] = Math.min(dp(n / 2, x, y, memo) + Math.min((long) (n / 2) * x, y) + x,
                    dp(n / 2 + 1, x, y, memo) + Math.min((long) (n - n / 2) * x, y) + x);
        }

    }

    static class ArrayUtils {
        public static long[] createArray(int count, long value) {
            long[] array = new long[count];
            Arrays.fill(array, value);
            return array;
        }

    }

    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(long 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 {
            boolean isSpaceChar(int ch);

        }

    }
}

import java.io.*;
import java.math.*;
import java.security.KeyStore.Entry;
import java.util.*;
/*
                                                                yash jobanputra
                                                                    DA-IICT
*/
public class yash {
    private static InputStream stream;
    private static byte[] buf = new byte[1024];
    private static int curChar;
    private static int numChars;
    private static SpaceCharFilter filter;
    private static PrintWriter pw;
    private static long mod = 1000000000 + 7;
    private static long mod1 = 1000000000 + 9;
    private static int MAX=1000001;
    private static int block;
    private static int[] par;
    private static long[] cost;
    private static long[] costm;
    private static int times;
    private static long ans;
    private static int max=51;
    private static boolean[] vis;
    private static boolean[] vis2;
    private static boolean[] vis3;
    private static long[] sa;
    private static long count;
    private static boolean ff;
    private static ArrayList<Integer>[] ggc;
    private static long[] arra;
    private static long[] a;
    private static int[] sp;
    private static int[] dp;
    private static int x;
    //private static long[] dist;
    public static void soln()
    {
    	int n=ni();int x=ni();int y=ni();long[] dp=new long[10000000+5];
    	dp[1]=x;
    	for(int i=2;i<=10000000;i++)
    	{
    		if(i%2==0)
    			dp[i]=Math.min(dp[i/2]+y,dp[i-1]+x);
    		else
    			dp[i]=Math.min(dp[i-1]+x, dp[(i+1)/2]+x+y);
    	}
    	pl(dp[n]);
    }
    public static void dfs(ArrayList<Pair>[] gr,int v)
    {
        vis[v]=true;
        ArrayList<Pair> arr=gr[v];
        for(int i=0;i<arr.size();i++)
        {
            if(!vis[arr.get(i).v])
            {
           		dfs(gr,arr.get(i).v);
           	}
        }
    }
    public static class lca{
    	int[] e;
    	int[] l;
    	int[] h;
    	int[] level;
    	boolean[] vis;
    	int time;
    	int[] tree=new int[10000000];
        int[] lazy=new int[10000000];
        int n;
    	public lca(ArrayList<Integer>[] g)
    	{
    		n=g.length-1;
    		pw.println(n);
    		e=new int[2*n];
    		l=new int[2*n];
    		h=new int[n+1];
    		vis=new boolean[n+1];
    		level=new int[n+1];
    		level[1]=0;
    		dfs(g,1);
    		Arrays.fill(lazy, 0);
    		build(l,0,0,2*n-1);
    	}
    	public int lf(int u,int v)
    	{
    		int a=h[u];int b=h[v];
    		if(h[u]>h[v])
    			{a=h[v];b=h[u];}
    		int p=query(l,0,0,2*n-1,a,b);
    		return e[p];
    	}
    	public void dfs(ArrayList<Integer>[] gr,int v)
        {
             vis[v]=true;
             time++;
             e[time]=v;
             l[time]=level[v];
             h[v]=time;
             ArrayList<Integer> arr=gr[v];
             for(int i=0;i<arr.size();i++)
             {
                 if(!vis[arr.get(i)])
                 {
                	 level[arr.get(i)]=level[v]+1;
                	 dfs(gr,arr.get(i));
                	 time++;e[time]=v;l[time]=level[v];
                 }
             }
         }
    	 public void build(int[] arr,int node,int l,int r)
         {
             if(l==r)
             {
                 tree[node]=l;
             }
             else
             {
                 int m=(l+r)/2;
                 build(arr,(2*node)+1,l,m);
                 build(arr,(2*node)+2,m+1,r);
                 if(arr[tree[2*node+1]]<arr[tree[2*node+2]])
                	 tree[node]=tree[2*node+1];
                 else
                	 tree[node]=tree[2*node+2];
             }
         }
    	 public int query(int[] arr,int node,int l,int r,int s,int e)
         {
             if(e<l || r<s)
                 return -1;
             if(s<=l && e>=r)
                 return tree[node];
             int m=(l+r)/2;
             int p1=query(arr,(2*node+1),l,m,s,e);
             int p2=query(arr,(2*node+2),m+1,r,s,e);
             if(p1==-1)
            	 return p2;
             else if(p2==-1)
            	 return p1;
             else
             {
            	 if(arr[p1]<arr[p2])
            		 return p1;
            	 else
            		 return p2;
             }
         }
    }
    public static long[] reverse(long[] arr, int l, int r)
      {
          int d = (r-l+1)/2;
          for(int i=0;i<d;i++)
          {
             long t = arr[l+i];
             arr[l+i] = arr[r-i];
             arr[r-i] = t;
          }
          return arr;
      }
    private static class graph{
        public static void arti(boolean[] ap,int[] parent,int[] disc,int[] low,ArrayList<Integer>[] gr,boolean[] vis,int ver)
        {
            int child=0;
            vis[ver]=true;
            ArrayList<Integer> arr=gr[ver];
            times++;
            disc[ver]=low[ver]=times;
            for(int i=0;i<arr.size();i++)
            {
                if(!vis[arr.get(i)])
                {
                    child++;
                    parent[arr.get(i)]=ver;
                    arti(ap,parent,disc,low,gr,vis,arr.get(i));
                    low[ver]=Math.min(low[ver], low[arr.get(i)]);
                    if(parent[ver]!=0 && low[arr.get(i)]>=disc[ver])
                        ap[ver]=true;
                    if(parent[ver]==0 && child>1)
                        ap[ver]=true;
                }
                else if(parent[ver]!=arr.get(i))
                    low[ver]=Math.min(low[ver], disc[arr.get(i)]);
            }
        }
        public static void floyd(Pair[] arr,int n,int m,int[][] dist)
        {
            for(int i=0;i<=n;i++)
            {
                Arrays.fill(dist[i], Integer.MAX_VALUE);
            }
            for(int c=0;c<m;c++)
            {
                int w=arr[c].v;
                int a=arr[c].j.v;
                int b=arr[c].j.i;
                dist[a][b]=w;
            }
            for(int i=0;i<=n;i++)
                dist[i][i]=0;
            for(int k=1;k<=n;k++)
            {
                for(int i=1;i<=n;i++)
                {
                    for(int j=1;j<=n;j++)
                    {
                        if(dist[i][k]!=Integer.MAX_VALUE && dist[k][j]!=Integer.MAX_VALUE)
                        dist[i][j]=Math.min(dist[i][j], dist[i][k]+dist[k][j]);
                    }
                }
            }
        }
        public static boolean bfs(ArrayList<Integer>[] gr,int v,int n)
        {

            boolean[] vis=new boolean[n+1];
            int c2=0;
            Queue<Integer> q=new LinkedList<>();
            q.add(v);
            while(!q.isEmpty())
            {
                int x=q.poll();
                Iterator<Integer> it=gr[x].iterator();
                while(it.hasNext())
                {
                    int p=it.next();
                    if(!vis[p])
                    {
                        q.add(p);
                        c2++;
                        vis[p]=true;
                    }
                }
            }
            return c2==n;
        }
        public static ArrayList<Pair> MSTP(int n,int m,ArrayList<Pair>[] arr,int[][] arr2)
        {
            ArrayList<Pair> pp=new ArrayList<>();
            int[] par=new int[n+1];
            int[] key=new int[n+1];
            vis=new boolean[n+1];
            Arrays.fill(key, Integer.MAX_VALUE);
            key[1]=0;
            PriorityQueue<Integer> dis=new PriorityQueue<>(n+1,
                    new Comparator<Integer>()
                    {
                        public int compare(Integer p,Integer q)
                        {
                        return key[p]-key[q];
                        }
                    }
                    );
            dis.add(1);
            vis[1]=true;
            while(!dis.isEmpty())
            {
                //pw.println(dis);
                int u=dis.poll();
                    ArrayList<Pair> p=arr[u];
                    for(int i=0;i<p.size();i++)
                    {
                        if(key[u]+p.get(i).i<key[p.get(i).v])
                        {
                            key[p.get(i).v]=key[u]+p.get(i).i;
                            par[p.get(i).v]=u;
                            if(!vis[p.get(i).v])
                            {
                                dis.add(p.get(i).v);
                                vis[p.get(i).v]=true;
                            }
                        }
                    }
            }
            for(int i=1;i<=n;i++)
                pp.add(new Pair(i,par[i]));
            return pp;
        }
        public static ArrayList<Pair> MSTK(int n,int m,Pair[] arr)
        {
            ArrayList<Pair> pp=new ArrayList<>();
            long sum=0;
            Arrays.sort(arr);
            DSU x=new DSU(n+1);
            for(int c=0;(c<m);c++)
            {
                Pair p=arr[c];
                //int a=p.v;
                //int b=p.i;
                int a=p.j.v;
                int b=p.j.i;
                int w=p.v;
                if(x.find(a)!=x.find(b))
                {
                    pp.add(new Pair(w,new Pair(a,b)));
                    x.Union(a, b);
                }
            }
            return pp;
        }
        public static int[] dijkstras(ArrayList<Pair>[] gr)
        {
            int n=gr.length-1;
            int[] dist=new int[n+1];
            Arrays.fill(dist, Integer.MAX_VALUE);

            PriorityQueue<Integer> dis=new PriorityQueue<>(n+1,
                    new Comparator<Integer>()
                    {
                        public int compare(Integer p,Integer q)
                        {
                        return dist[p]-dist[q];
                        }
                    }
                    );
            boolean[] vis=new boolean[n+1];
            Arrays.fill(vis, false);

            int s=1;
            dist[s]=0;
            dis.add(s);
            vis[s]=true;
            while(!dis.isEmpty())
            {
                int p=dis.poll();
                for(int i=0;i<gr[p].size();i++)
                {
                    int y=gr[p].get(i).v;
                    int w=gr[p].get(i).i;
                    if(!vis[y])
                    {
                        dist[y]=dist[p]+w;
                        dis.add(y);
                        vis[y]=true;
                    }
                    else
                    {
                        if(dist[p]+w<dist[y])
                        {
                            dist[y]=dist[p]+w;
                        }
                    }
                }
            }
            return dist;
        }
    }

    public static class sieve{
        public static ArrayList<Integer> sieves(int n)
        {
            ArrayList<Integer> arr=new ArrayList<>();
            boolean[] bol=new boolean[n+1];
            Arrays.fill(bol, true);
            //arr.add(1);
            for(int i=2;i<=n;i++)
            {
                if(bol[i])
                {
                    arr.add(i);
                    for(int j=2;j*i<=n;j++)
                    {
                        bol[i*j]=false;
                    }
                }
            }
            return arr;
        }
    }
    public static class isprime{
        public static boolean check(int n)
        {
            if(n==2)
                return true;
            else if(n==3)
                return true;
            else if(n%2==0)
                return false;
            else if(n%3==0)
                return false;
            else
            {
                for(int i=6;;i+=6)
                {
                    if(i>Math.sqrt(n))
                        break;
                    if(n%(i-1)==0)
                    {
                        return false;
                    }
                    else if(n%(i+1)==0)
                        return false;
                                    }
                return true;
            }
        }
    }
    private static class DSU{
        int[] parent;
        int[] rank;
        int cnt;
        public DSU(int n){
            parent=new int[n];
            rank=new int[n];
            for(int i=0;i<n;i++){
                parent[i]=i;
                rank[i]=1;
            }
            cnt=n;
        }
        int find(int i){
            while(parent[i] !=i){
                parent[i]=parent[parent[i]];
                i=parent[i];
            }
            return i;
        }
        int Union(int x, int y){
            int xset = find(x);
            int yset = find(y);
            if(xset!=yset)
                cnt--;
            if(rank[xset]<rank[yset]){
                parent[xset] = yset;
                rank[yset]+=rank[xset];
                rank[xset]=0;
                return yset;
            }else{
                parent[yset]=xset;
                rank[xset]+=rank[yset];
                rank[yset]=0;
                return xset;
            }
        }
    }
    private static class Pair implements Comparable<Pair>{
        int v,i;Pair j;
        public Pair(int a,int b){
            v=a;
            i=b;
        }
        public Pair(int a,Pair b)
        {
            v=a;
            j=b;
        }
        @Override
        public int compareTo(Pair arg0) {
            {
                return this.v-arg0.v;
            }
        }
    }
    private static class Pairl implements Comparable<Pairl>{
        long v,i;Pairl j;
        public Pairl(long a,long b){
            v=a;
            i=b;
        }
        public Pairl(long a,Pairl b)
        {
            v=a;
            j=b;
        }
        @Override
        public int compareTo(Pairl arg0) {
            {
                if(this.v>arg0.v)
                    return 1;
                else
                    return -1;
            }
        }
    }
    public static long f(long number,long m) {
          if (number <= 1) return 1;
          else return (number * f(number - 1,m))%m;
       }
    public static long mmi(long a, long m)
    {
        long m0 = m;
        long y = 0, x = 1;

        if (m == 1)
          return 0;

        while (a > 1)
        {
            // q is quotient
            long q = a / m;
            long t = m;

            // m is remainder now, process same as
            // Euclid's algo
            m = a % m; a = t;
            t = y;

            // Update y and x
            y = x - q * y;
            x = t;
        }

        // Make x positive
        if (x < 0)
           x += m0;

        return x;
    }
    public static class segtree{
        static int[] tree=new int[10000000];
        static int[] lazy=new int[10000000];
        public static void initial()
        {
            Arrays.fill(lazy, 0);
        }
        public static void build(int[] arr,int node,int l,int r)
        {
            if(l==r)
            {
                tree[node]=arr[l];
            }
            else
            {
                int m=(l+r)/2;
                build(arr,(2*node)+1,l,m);
                build(arr,(2*node)+2,m+1,r);
                tree[node]=tree[2*node+1]+tree[(2*node)+2];
            }
        }
        public static void updater(int[] arr,int node,int l,int r,int s,int e,int val)
        {
            if(lazy[node]!=0)
            {
                tree[node]+=(r-l+1)*lazy[node];
                if(l!=r)
                {
                    lazy[2*node+1]+=lazy[node];
                    lazy[2*node+2]+=lazy[node];
                }
                lazy[node]=0;
            }
            if(s<=l && e>=r)
            {
                tree[node]+=(r-l+1)*val;
                if(l!=r)
                {
                    lazy[2*node+1]+=val;
                    lazy[2*node+2]+=val;
                }
            }
            else if(!(e<l || r<s))
            {
                int m=(l+r)/2;
                updater(arr,2*node+1,l,m,s,e,val);
                updater(arr,2*node+2,m+1,r,s,e,val);
                tree[node]=tree[2*node+1]+tree[2*node+2];
            }
        }
        public static void update(int[] arr,int node,int l,int r,int ind,int val)
        {
            if(l==r)
            {
                arr[ind]+=val;
                tree[node]+=val;
            }
            else
            {
                int m=(l+r)/2;
                if(l<=ind && ind<=m)
                {
                    update(arr,(2*node+1),l,m,ind,val);
                }
                else
                {
                    update(arr,(2*node+2),m+1,r,ind,val);
                }
                tree[node]=tree[2*node+1]+tree[2*node+2];
            }
        }
        public static int query(int node,int l,int r,int s,int e)
        {
            if(lazy[node]!=0)
            {
                tree[node]+=(r-l+1)*lazy[node];
                if(l!=r)
                {
                    lazy[2*node+1]+=lazy[node];
                    lazy[2*node+2]+=lazy[node];
                }
                lazy[node]=0;
            }
            if(e<l || r<s)
                return 0;
            if(s<=l && e>=r)
                return tree[node];
            int m=(l+r)/2;
            int p1=query((2*node+1),l,m,s,e);
            int p2=query((2*node+2),m+1,r,s,e);
            return (p1+p2);
        }
    }

    private static long pow(long a, long b, long c) {
        if (b == 0)
            return 1;
        long p = pow(a, b / 2, c);
        p = (p * p) % c;
        return (b % 2 == 0) ? p : (a * p) % c;
    }
    private static long gcd(long n, long l) {
        if (l == 0)
            return n;
        return gcd(l, n % l);
    }
    private static int gcd(int n, int l) {
        if (l == 0)
            return n;
        return gcd(l, n % l);
    }
    private static long max(long a, long b) {
        if (a > b)
            return a;
        return b;
    }
    private static long min(long a, long b) {
        if (a < b)
            return a;
        return b;
    }
    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++;
        }
    }
    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 void sort(long arr[])
    {
    	sort(arr,0,arr.length-1);
    }
    public static void sort(int arr[])
    {
    	sort(arr,0,arr.length-1);
    }
    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 main(String[] args) throws Exception {
        new Thread(null,new Runnable(){
            @Override
            public void run() {
               /* try {
                    InputReader(new FileInputStream("input.txt"));
                } catch (FileNotFoundException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }*/
                InputReader(System.in);
                pw = new PrintWriter(System.out);
                /*try {
                    pw=new PrintWriter(new FileOutputStream("output.txt"));
                } catch (FileNotFoundException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }*/
                soln();
                pw.close();
            }
        },"1",1<<26).start();
    }

    public static void InputReader(InputStream stream1) {
        stream = stream1;
    }

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

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

    private static 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++];
    }

    private static int ni() {
        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 long nl() {
        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;
    }
    private static double nd()
    {
        double ret = 0, div = 1;
        int 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 static String nextToken() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

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

    private static int[] nia(int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = ni();
        }
        return arr;
    }

    private static long[] nla(int n) {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++) {
            arr[i] = nl();
        }
        return arr;
    }

    private static void pa(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            pw.print(arr[i] + " ");
        }
        pw.println();
        return;
    }

    private static void pa(long[] arr) {
        for (int i = 0; i < arr.length; i++) {
            pw.print(arr[i] + " ");
        }
        pw.println();
        return;
    }
    private static void pl(int a)
    {
    	pw.println(a);
    }
    private static void pl(long a)
    {
    	pw.println(a);
    }
    private static void p(int a)
    {
    	pw.print(a+" ");
    }
    private static void p(long a)
    {
    	pw.print(a+" ");
    }
    private static boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return isWhitespace(c);
    }
    private static char nc() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        char c1=(char)c;
        while(!isSpaceChar(c))
            c=read();
        return c1;
    }
    public String ns() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }
    private interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

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

public class generateString
{
	static int n;
	static long x;
	static long y;
	static long []dp;

	static long rec(int i)
	{
		if (i == 0)
			return 0;
		if (i == 1)
			return x;

		if (dp[i] != -1)
			return dp[i];

		long res = x*i;

		if (i %2 == 0)
			res = Math.min(res, y+rec(i/2));
		else
			{
				res = Math.min(res, x+y+rec( (i/2+1) ));
				res = Math.min(res, x+y+rec(i/2));
			}

		return dp[i] = res;
	}

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

		n = sc.nextInt();
		x = sc.nextLong();
		y = sc.nextLong();

		dp = new long [n+1];
		Arrays.fill(dp,-1);
		dp[1] = x;

		for (int i = 2; i<= n; i++)
		{
			if (i % 2 == 0)
				dp[i] = Math.min(dp[i-1]+x, y + dp[i/2]);
			else
				dp[i] = Math.min(dp[i-1]+x, x+y+dp[(i+1)/2]);
		}
		out.println(dp[n]);
		//out.println(rec(n));
		out.close();

	}

}

import java.util.*;
import java.io.*;
import java.math.*;
public class code5 {
	InputStream is;
	PrintWriter out;
	static long mod=pow(10,9)+7;
	static final int max=100000;
	static int dx[]={1,-1,-1,1,0,0,1,-1},dy[]={1,-1,1,-1,1,-1,0,0};
	void solve()
	{
		int n=ni();
		int x=ni();
		int y=ni();
		long dp[]=new long[n+1];
		dp[1]=x;
		for(int i=2;i<=n;i++)
		{
			if(i%2==0)
			{
				dp[i]=Math.min(dp[i/2]+y,dp[i-1]+x);
			}else{
				dp[i]=Math.min(dp[(i+1)/2]+y+x,dp[i-1]+x);
			}
		}
		out.println(dp[n]);
	}
	public static int count(int x)
	{
		int num=0;
		while(x!=0)
		{
			x=x&(x-1);
			num++;
		}
		return num;
	}
	static long d, x, y;
	void extendedEuclid(long A, long B) {
	    if(B == 0) {
	        d = A;
	        x = 1;
	        y = 0;
	    }
	    else {
	        extendedEuclid(B, A%B);
	        long temp = x;
	        x = y;
	        y = temp - (A/B)*y;
	    }
	}
	long modInverse(long A,long M) //A and M are coprime
	{
	    extendedEuclid(A,M);
	    return (x%M+M)%M;    //x may be negative
	}
	public static void mergeSort(int[] arr, int l ,int r){
		if((r-l)>=1){
			int mid = (l+r)/2;
			mergeSort(arr,l,mid);
			mergeSort(arr,mid+1,r);
			merge(arr,l,r,mid);
		}
	}
	public static void merge(int arr[], int l, int r, int mid){
		int n1 = (mid-l+1), n2 = (r-mid);
		int left[] = new int[n1];
		int right[] = new int[n2];
		for(int i =0 ;i<n1;i++) left[i] = arr[l+i];
		for(int i =0 ;i<n2;i++) right[i] = arr[mid+1+i];
		int i =0, j =0, k = l;
		while(i<n1 && j<n2){
			if(left[i]>right[j]){
				arr[k++] = right[j++];
			}
			else{
				arr[k++] = left[i++];
			}
		}
		while(i<n1) arr[k++] = left[i++];
		while(j<n2) arr[k++] = right[j++];
	}
	public static void mergeSort(long[] arr, int l ,int r){
		if((r-l)>=1){
			int mid = (l+r)/2;
			mergeSort(arr,l,mid);
			mergeSort(arr,mid+1,r);
			merge(arr,l,r,mid);
		}
	}
	public static void merge(long arr[], int l, int r, int mid){
		int n1 = (mid-l+1), n2 = (r-mid);
		long left[] = new long[n1];
		long right[] = new long[n2];
		for(int i =0 ;i<n1;i++) left[i] = arr[l+i];
		for(int i =0 ;i<n2;i++) right[i] = arr[mid+1+i];
		int i =0, j =0, k = l;
		while(i<n1 && j<n2){
			if(left[i]>right[j]){
				arr[k++] = right[j++];
			}
			else{
				arr[k++] = left[i++];
			}
		}
		while(i<n1) arr[k++] = left[i++];
		while(j<n2) arr[k++] = right[j++];
	}
	 static class Pair implements Comparable<Pair>{

	       int x,y,k,i;

		Pair (int x,int y){
			this.x=x;
			this.y=y;
		}

		public int compareTo(Pair o) {
					return this.x-o.x;
		}

	        public boolean equals(Object o) {
	            if (o instanceof Pair) {
	                Pair p = (Pair)o;
	                return p.x == x && p.y == y && p.k==k;
	            }
	            return false;
	        }

	        @Override
	        public String toString() {
	            return  "("+x + " " + y +" "+k+" "+i+" )";
	        }

	    }

	    public static boolean isPal(String s){
	        for(int i=0, j=s.length()-1;i<=j;i++,j--){
	                if(s.charAt(i)!=s.charAt(j)) return false;
	        }
	        return true;
	    }
	    public static String rev(String s){
			StringBuilder sb=new StringBuilder(s);
			sb.reverse();
			return sb.toString();
	    }

	    public static long gcd(long x,long y){
		if(x%y==0)
			return y;
		else
			return gcd(y,x%y);
	    }

	    public static int gcd(int x,int y){
	    	if(y==0)
	    		return x;
	    	return gcd(y,x%y);
	    }

	    public static long gcdExtended(long a,long b,long[] x){

	        if(a==0){
	            x[0]=0;
	            x[1]=1;
	            return b;
	        }
	        long[] y=new long[2];
	        long gcd=gcdExtended(b%a, a, y);

	        x[0]=y[1]-(b/a)*y[0];
	        x[1]=y[0];

	        return gcd;
	    }

	    public static int abs(int a,int b){
		return (int)Math.abs(a-b);
	    }

	    public static long abs(long a,long b){
		return (long)Math.abs(a-b);
	    }

	    public static int max(int a,int b){
		if(a>b)
			return a;
		else
			return b;
	    }

	    public static int min(int a,int b){
		if(a>b)
			return b;
		else
			return a;
	    }

	    public static long max(long a,long b){
		if(a>b)
			return a;
		else
			return b;
	    }

	    public static long min(long a,long b){
		if(a>b)
			return b;
		else
			return a;
	    }

	    public static long pow(long n,long p,long m){
		 long  result = 1;
		  if(p==0)
		    return 1;
		if (p==1)
		    return n;
		while(p!=0)
		{
		    if(p%2==1)
		        result *= n;
		    if(result>=m)
		    result%=m;
		    p >>=1;
		    n*=n;
		    if(n>=m)
		    n%=m;
		}
		return result;
	    }

	    public static long pow(long n,long p){
		long  result = 1;
		  if(p==0)
		    return 1;
		if (p==1)
		    return n;
		while(p!=0)
		{
		    if(p%2==1)
		        result *= n;
		    p >>=1;
		    n*=n;
		}
		return result;
	    }
	    public static void debug(Object... o) {
			System.out.println(Arrays.deepToString(o));
		}
	    void run() throws Exception {
			is = System.in;
			out = new PrintWriter(System.out);
			solve();
			out.flush();
		}

	    public static void main(String[] args) throws Exception {
			new Thread(null, new Runnable() {
				public void run() {
					try {
						new code5().run();
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			}, "1", 1 << 26).start();

		}
	    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();
			}
		}

}

import java.io.*;
import java.util.*;
/**
 *
 * @author Sourav Kumar Paul (spaul100)
 * NIT Silchar
 */

public class SolveEE {

    public static Reader in;
    public static PrintWriter out;
    public static long mod = 1000000007;
    public static long inf = 100000000000000000l;
    public static long fac[],inv[];
    public static int union[];

    public static void solve(){
         int n = in.nextInt();
       long x = in.nextLong();
       long y = in.nextLong();
     long dp[] = new long[n+1];
     Arrays.fill(dp,inf);
     dp[0] = 0;
        for(int i=1; i<=n; i++)
        {
            dp[i] = Math.min(dp[i], dp[i-1] + x);
            if(i%2==0)
            {
                dp[i] = Math.min(dp[i], dp[i/2] + y);
                dp[i] = Math.min(dp[i], dp[i/2 + 1] + 2*x + y);
            }
            else
            {
                dp[i] = Math.min(dp[i], dp[i/2] + x+ y);
                dp[i] = Math.min(dp[i], dp[i/2 + 1] + x+y);
            }

        }
        out.println(dp[n]);
    }

/**
 *  ############################### Template ################################
 */

    public static class Pair implements Comparable{
        long x;
        int y;

        Pair(long x, int y)
        {
            this.x = x;
            this.y = y;
        }
        @Override
        public int compareTo(Object o)
        {
            Pair pp = (Pair)o;
            if(pp.x == x)
                return 0;
            else if (x>pp.x)
                return 1;
            else
                return -1;
        }
    }

    public static void init()
    {
        for(int i=0; i<union.length; i++)
            union[i] = i;
    }
    public static int find(int n)
    {
        return (union[n]==n)?n:(union[n]=find(union[n]));
    }
    public static void unionSet(int i ,int j)
    {
        union[find(i)]=find(j);
    }
    public static boolean connected(int i,int j)
    {
        return union[i]==union[j];
    }

    public static long gcd(long a, long b) {
        long x = Math.min(a,b);
        long y = Math.max(a,b);
        while(x!=0)
        {
            long temp = x;
            x = y%x;
            y = temp;
        }
        return y;
    }

    public static long modPow(long base, long exp, long mod) {
        base = base % mod;
        long result =1;
        while(exp > 0)
        {
            if(exp % 2== 1)
            {
                result = (result * base) % mod;
                exp --;
            }
            else
            {
                base = (base * base) % mod;
                exp = exp >> 1;
            }

        }
        return result;
    }

    public static void cal()
    {
        fac = new long[1000005];
        inv = new long[1000005];
        fac[0]=1;
        inv[0]=1;
        for(int i=1; i<=1000000; i++)
        {
            fac[i]=(fac[i-1]*i)%mod;
            inv[i]=(inv[i-1]*modPow(i,mod-2,mod))%mod;
        }
    }
    public static long ncr(int n, int r)
    {
        return (((fac[n]*inv[r])%mod)*inv[n-r])%mod;
    }

    SolveEE() throws IOException {
	in = new Reader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
	solve();
        out.flush();
	out.close();
    }

    public static void main(String args[]) {
	new Thread(null, new Runnable() {
            public void run() {
                try {
                    new SolveEE();
		} catch (Exception e) {
                    e.printStackTrace();
		}
            }
	}, "1", 1 << 26).start();
    }

    public static class Reader {
        public BufferedReader reader;
        public StringTokenizer st;

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

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

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public String nextLine() throws IOException{
            return reader.readLine();
        }
        public long nextLong(){
            return Long.parseLong(next());
        }
        public double nextDouble(){
            return Double.parseDouble(next());
        }

    }
}

import java.util.*;

public class A  {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		int xy = x + y;
		long[] memo = new long[n + 1];
		memo[0] = 0;
		memo[1] = x;
		boolean even = true;
		int vhalfCeil = 1;
		for (int v = 2; v <= n; v++) {
			if (even) {
				memo[v] = min(memo[vhalfCeil] + y, memo[v - 1] + x);
			} else {
				memo[v] = min(memo[v - 1] + x, memo[vhalfCeil] + xy);
			}
			if(even)
				vhalfCeil++;
			even = !even;
		}
		System.out.println(memo[n]);
	}
	public static long min(long a, long b) {
		if(a < b)
			return a;
		return b;
	}

}

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

public class Codeforces{

	public static void main(String[] args) throws IOException{
		Scan scan = new Scan();
	       int n = scan.nextInt();
	       int x = scan.nextInt();
	       int y = scan.nextInt();
	       long[] time = new long[n + 1];
	       time[0] = 0;
	       time[1] = x;
	       for(int i = 2; i <= n; i++){
	    	   long puttime = time[i - 1] + x;
	    	   long duptime = time[(i + 1) / 2] + y;
	    	   if((i & 1) != 0) duptime += x;
	    	   time[i] = Math.min(puttime, duptime);
	       }
	       System.out.println(time[n]);
	}

	public static class Scan{
		BufferedReader br;
		String[] s;
		String str;
		int strIndex;
		int index;
		public Scan(){
			br = new BufferedReader(new InputStreamReader(System.in));
			index = 0;
			s = new String[0];
			str = "a";
			strIndex = 1;
		}
		public String nextLine() throws IOException{
			return br.readLine();
		}
		public char nextChar() throws IOException{
			if(strIndex == str.length()){
				str = br.readLine();
				strIndex = 0;
			}
			strIndex++;
			return str.charAt(strIndex - 1);
		}
		public char[] nextCharArray() throws IOException{
			str = br.readLine();
			strIndex = str.length();
			return str.toCharArray();
		}
		public int[] nextIntArray() throws IOException{
			s = br.readLine().split(" ");
			int[] result = new int[s.length];
			for(int i = 0; i < s.length; i++) result[i] = Integer.parseInt(s[i]);
			index = s.length;
			return result;
		}
		public long[] nextLongArray() throws IOException{
			s = br.readLine().split(" ");
			long[] result = new long[s.length];
			for(int i = 0; i < s.length; i++) result[i] = Long.parseLong(s[i]);
			index = s.length;
			return result;
		}
		public double[] nextDoubleArray() throws IOException{
			s = br.readLine().split(" ");
			double[] result = new double[s.length];
			for(int i = 0; i < s.length; i++) result[i] = Double.parseDouble(s[i]);
			index = s.length;
			return result;
		}
		public int nextInt() throws IOException{
			if(index == s.length){
				s = br.readLine().split(" ");
				index = 0;
			}
			index++;
			return Integer.parseInt(s[index - 1]);
		}
		public long nextLong() throws IOException{
			if(index == s.length){
				s = br.readLine().split(" ");
				index = 0;
			}
			index++;
			return Long.parseLong(s[index - 1]);
		}
		public double nextDouble() throws IOException{
			if(index == s.length){
				s = br.readLine().split(" ");
				index = 0;
			}
			index++;
			return Double.parseDouble(s[index - 1]);
		}
	}
}

//package GeneralProblems;

import java.util.Arrays;
import java.util.Scanner;

public class GenerateAString {
	static long x, y;
	static long memo[];
	static long n;
	static int findBiggestPow(long x) {
		int low = 0;
		int ans = 0;
		int high = 30;
		while(low<=high) {
			int mid = (low+high)/2;
			if(1<<mid >x) {
				high=mid-1;
			}else if(1<<mid==x)
				return mid;
			else{
				ans = Math.max(ans, mid);
				low = mid+1;
			}
		}
		return ans;
	}
	static long dp(int cur) {
//		System.out.println(cur);
		if (cur == 0)
			return memo[cur]=0;
		if(cur ==1)
			return memo[1]=x;
		if(memo[cur]!=-1)
			return memo[cur];
		long oneWay = dp(cur-1)+x;

		if((cur&1)!=0)
			oneWay = Math.min(oneWay, dp(cur/2)+y);
		else
			oneWay = Math.min(oneWay, dp((cur+1)/2)  +y+x);

		return memo[cur] = oneWay;

	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextLong();
		x = sc.nextLong();
		y = sc.nextLong();
		memo = new long[(int) n+1];
		memo[0]=0;
		memo[1]=x;
		for (int i = 2; i < memo.length; i++) {
			memo[i]=memo[i-1]+x;
			if((i&1)==0)
				memo[i]=Math.min(memo[i], memo[i/2]+y);
			else
				memo[i]=Math.min(memo[i], memo[(i+1)/2]+x+y);
		}
		System.out.println(memo[(int)n]);
	}
}

import java.util.Scanner;

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

    int n;
    int x;
    int y;
    long[] optimalTimes;

    private void run() {
        init();
        long optimalTime = evalOptimalTime();
        System.out.println(optimalTime);
    }

    private void init() {
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        x = scanner.nextInt();
        y = scanner.nextInt();
        optimalTimes = new long[n + 2];
        optimalTimes[0] = 0;
        optimalTimes[1] = x;
        for (int i = 2; i <= n + 1; i++) {
            optimalTimes[i] = -1;
        }
    }

    private long evalOptimalTime() {
        return evalOptimalTime(n);
    }

    private long evalOptimalTime(int number) {
        if (optimalTimes[number] != -1) return optimalTimes[number];
        if (number % 2 == 0) {
            long timeByAddition = (long)x * number;
            long timeByMultiplication = evalOptimalTime(number / 2) + y;
            optimalTimes[number] = Math.min(timeByAddition, timeByMultiplication);
        } else {
            long timeByAddition = evalOptimalTime(number - 1) + x;
            long timeBySubtraction = evalOptimalTime(number + 1) + x;
            optimalTimes[number] = Math.min(timeByAddition, timeBySubtraction);
        }
        return optimalTimes[number];
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        ConsoleIO io = new ConsoleIO();
        new Main(io).solve();
        io.close();
    }

    ConsoleIO io;

    Main(ConsoleIO io) {
        this.io = io;
    }

    class State {
        public State(int lim, long val){this.lim = lim;this.val = val;}
        public int lim;
        public long val;
    }

    long MOD = 1_000_000_007;
    int N, M, Q;

    public void solve() {
        N = io.ri();
        long x = io.ri();
        long y = io.ri();
        long[] all = new long[N + 1];
        State[] states = new State[N + 1];
        int head = 0, tail = 0;
        long minus = x;
        for (int i = 1; i <= N; i++, minus+=x) {
            all[i] = all[i - 1] + x;
            if ((i & 1) == 0)
                all[i] = Math.min(all[i], all[i >> 1] + y);

            if (head < tail && states[head].lim <= i) head++;

            if (head < tail)
                all[i] = Math.min(all[i], states[head].val - minus);

            long v = all[i] + y + (minus << 1L);
            while (tail > head && states[tail - 1].val >= v) tail--;
            states[tail++] = new State(i<<1, v);
        }

        io.writeLine(all[N] + "");
    }
}

class ConsoleIO {
    BufferedReader br;
    PrintWriter out;
    public ConsoleIO(){br = new BufferedReader(new InputStreamReader(System.in));out = new PrintWriter(System.out);}
    public void flush(){this.out.flush();}
    public void close(){this.out.close();}
    public void writeLine(String s) {this.out.println(s);}
    public void writeInt(int a) {this.out.print(a);this.out.print(' ');}
    public void writeWord(String s){
        this.out.print(s);
    }
    public void writeIntArray(int[] a, int k, String separator) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < k; i++) {
            if (i > 0) sb.append(separator);
            sb.append(a[i]);
        }
        this.writeLine(sb.toString());
    }
    public int read(char[] buf, int len){try {return br.read(buf,0,len);}catch (Exception ex){ return -1; }}
    public String readLine() {try {return br.readLine();}catch (Exception ex){ return "";}}
    public long[] readLongArray() {
        String[]n=this.readLine().trim().split("\\s+");long[]r=new long[n.length];
        for(int i=0;i<n.length;i++)r[i]=Long.parseLong(n[i]);
        return r;
    }
    public int[] readIntArray() {
        String[]n=this.readLine().trim().split("\\s+");int[]r=new int[n.length];
        for(int i=0;i<n.length;i++)r[i]=Integer.parseInt(n[i]);
        return r;
    }
    public int[] readIntArray(int n) {
        int[] res = new int[n];
        char[] all = this.readLine().toCharArray();
        int cur = 0;boolean have = false;
        int k = 0;
        boolean neg = false;
        for(int i = 0;i<all.length;i++){
            if(all[i]>='0' && all[i]<='9'){
                cur = cur*10+all[i]-'0';
                have = true;
            }else if(all[i]=='-') {
                neg = true;
            }
            else if(have){
                res[k++] = neg?-cur:cur;
                cur = 0;
                have = false;
                neg = false;
            }
        }
        if(have)res[k++] = neg?-cur:cur;
        return res;
    }
    public int ri() {
        try {
            int r = 0;
            boolean start = false;
            boolean neg = false;
            while (true) {
                int c = br.read();
                if (c >= '0' && c <= '9') {
                    r = r * 10 + c - '0';
                    start = true;
                } else if (!start && c == '-') {
                    start = true;
                    neg = true;
                } else if (start || c == -1) return neg ? -r : r;
            }
        } catch (Exception ex) {
            return -1;
        }
    }
    public long readLong() {
        try {
            long r = 0;
            boolean start = false;
            boolean neg = false;
            while (true) {
                int c = br.read();
                if (c >= '0' && c <= '9') {
                    r = r * 10 + c - '0';
                    start = true;
                } else if (!start && c == '-') {
                    start = true;
                    neg = true;
                } else if (start || c == -1) return neg ? -r : r;
            }
        } catch (Exception ex) {
            return -1;
        }
    }
    public String readWord() {
        try {
            boolean start = false;
            StringBuilder sb = new StringBuilder();
            while (true) {
                int c = br.read();
                if (c!= ' ' && c!= '\r' && c!='\n' && c!='\t') {
                    sb.append((char)c);
                    start = true;
                } else if (start || c == -1) return sb.toString();
            }
        } catch (Exception ex) {
            return "";
        }
    }
    public char readSymbol() {
        try {
            while (true) {
                int c = br.read();
                if (c != ' ' && c != '\r' && c != '\n' && c != '\t') {
                    return (char) c;
                }
            }
        } catch (Exception ex) {
            return 0;
        }
    }
    public char readChar(){try {return (char)br.read();}catch (Exception ex){ return 0; }}
}
class Pair {
    public Pair(int a, long b) {this.a = a;this.b = b;}
    public int a;
    public long b;
}
class Tri {
    public Tri(int a, int b, int c) {this.a = a;this.b = b;this.c = c;}
    public int a;
    public int b;
    public int c;
}
class PairLL {
    public PairLL(long a, long b) {this.a = a;this.b = b;}
    public long a;
    public long b;
}

import java.util.*;
import java.io.*;
public class GenerateaString
{

	/************************ SOLUTION STARTS HERE ***********************/

	static final long INF = (long)(1e18);
	static long memo[];
	static long findOpt(int idx ,long x , long y ){

		if(memo[idx] != -1)
			return memo[idx];
		else{
			long ans = INF;
			if(idx % 2 == 1) // min ( add , double and remove )
				ans = Math.min(x + findOpt(idx - 1, x, y),y + x + findOpt((idx + 1) / 2, x, y));
			else
				ans = Math.min(x + findOpt(idx - 1, x, y),y + findOpt(idx / 2, x, y));

			return memo[idx] = ans;
		}

	}

	private static void solve(FastScanner s1, PrintWriter out){

		int N = s1.nextInt();
		long x = s1.nextLong();
		long y = s1.nextLong();
	/*
		memo = new long[N + 1];
		Arrays.fill(memo, -1);
		memo[1] = x;
		memo[0] = INF;
		out.println(findOpt(N, x, y ));
	*/
		long dp[] = new long[N + 1];
		dp[1] = x;
		for(int i=2;i<=N;i++){
			if(i % 2 == 1)
				dp[i] = Math.min(dp[i - 1] + x,x + y + dp[(i + 1) / 2]);
			else
				dp[i] = Math.min(dp[i - 1] + x,y + dp[i / 2]);
		}
		out.println(dp[N]);

	}

	/************************ SOLUTION ENDS HERE ************************/

	/************************ TEMPLATE STARTS HERE *********************/

	public static void main(String[] args) throws IOException {
		new Thread(null, new Runnable() {
			public void run() {
				new GenerateaString().run();
			}
		}, "Increase Stack", 1L << 25).start();

	}

	void run(){
		FastScanner in  = new FastScanner(System.in);
		PrintWriter out =
				new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), false);
		solve(in, out);
		in.close();
		out.close();
	}
	static class FastScanner{
		BufferedReader reader;
		StringTokenizer st;
		FastScanner(InputStream stream){reader=new BufferedReader(new InputStreamReader(stream));st=null;}
		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();}
		String nextLine()  {String s=null;try{s=reader.readLine();}catch(IOException e){e.printStackTrace();}return s;}
		int    nextInt()   {return Integer.parseInt(next());}
		long   nextLong()  {return Long.parseLong(next());}
		double nextDouble(){return Double.parseDouble(next());}
		char   nextChar()  {return next().charAt(0);}
		int[]  nextIntArray(int n)         {int[] arr= new int[n];   int i=0;while(i<n){arr[i++]=nextInt();}  return arr;}
		long[] nextLongArray(int n)        {long[]arr= new long[n];  int i=0;while(i<n){arr[i++]=nextLong();} return arr;}
		int[]  nextIntArrayOneBased(int n) {int[] arr= new int[n+1]; int i=1;while(i<=n){arr[i++]=nextInt();} return arr;}
		long[] nextLongArrayOneBased(int n){long[]arr= new long[n+1];int i=1;while(i<=n){arr[i++]=nextLong();}return arr;}
		void   close(){try{reader.close();}catch(IOException e){e.printStackTrace();}}
	}

	/************************ TEMPLATE ENDS HERE ************************/
}

import java.util.*;
import java.awt.geom.Point2D;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.*;
import java.math.BigInteger;
public class test {
    static long n,x,y;
    static long oo=1000000000;
    static long[] dp ;
	public static void main (String [] test) throws IOException   {
	Scanner in = new Scanner(System.in);
    PrintWriter out = new PrintWriter(System.out);
    n = in.nextLong();x=in.nextLong();y=in.nextLong();
    dp = new long [(int) (n+1)];
    Arrays.fill(dp,oo);
    dp[1]=x;
    for(int i = 2 ; i<=n ; i++){
    	if((i&1) == 0){
    		dp[i]=Math.min(dp[i-1]+x, dp[i/2]+y);
    	}else{
    		dp[i]=Math.min(dp[i-1]+x, dp[(i+1)/2]+x+y);
    	}
    }
    out.println(dp[(int) (n)]);
    out.flush();
    out.close();

	}

}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        long insertWeight = input.nextInt();
        long doubleWeight = input.nextInt();

        long ans[] = new long[n + 1];
        ans[0] = 0;
        ans[1] = insertWeight;
        for (int i = 2; i < n+1; i++) {
            if (i % 2 == 1) {
                ans[i] = Math.min(ans[(i - 1)] + insertWeight, ans[(i + 1) / 2] + insertWeight + doubleWeight);
            } else {
                ans[i] = Math.min(ans[i / 2] + doubleWeight, ans[i - 1] + insertWeight);

            }
        }

        System.out.print(ans[n]);
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

/*
 public class _710E {

 }

 */

public class _710E
{
	public void solve() throws FileNotFoundException
	{
		InputStream inputStream = System.in;

		InputHelper inputHelper = new InputHelper(inputStream);

		PrintStream out = System.out;

		// actual solution
		int n = inputHelper.readInteger();
		long x = inputHelper.readInteger();
		long y = inputHelper.readInteger();

		long[] dp = new long[n + 2];

		Arrays.fill(dp, -1);

		dp[1] = x;

		System.out.println(f(n, dp, x, y));

		// end here
	}

	long f(int n, long[] dp, long x, long y)
	{
		if (dp[n] != -1)
		{
			return dp[n];
		}

		if (n % 2 == 0)
		{
			return dp[n] = Math.min(y + f(n / 2, dp, x, y), n * x);
		}
		else
		{
			return dp[n] = Math.min(x + f(n - 1, dp, x, y),
					x + f(n + 1, dp, x, y));
		}
	}

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

	class InputHelper
	{
		StringTokenizer tokenizer = null;
		private BufferedReader bufferedReader;

		public InputHelper(InputStream inputStream)
		{
			InputStreamReader inputStreamReader = new InputStreamReader(
					inputStream);
			bufferedReader = new BufferedReader(inputStreamReader, 16384);
		}

		public String read()
		{
			while (tokenizer == null || !tokenizer.hasMoreTokens())
			{
				try
				{
					String line = bufferedReader.readLine();
					if (line == null)
					{
						return null;
					}
					tokenizer = new StringTokenizer(line);
				}
				catch (IOException e)
				{
					e.printStackTrace();
				}
			}

			return tokenizer.nextToken();
		}

		public Integer readInteger()
		{
			return Integer.parseInt(read());
		}

		public Long readLong()
		{
			return Long.parseLong(read());
		}
	}
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class A {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		String[] s = br.readLine().trim().split(" ");
		int n = Integer.parseInt(s[0]);
		int x = Integer.parseInt(s[1]);
		int y = Integer.parseInt(s[2]);
		long[] dp = new long[n+1];
		Arrays.fill(dp, Long.MAX_VALUE);
		dp[0] = 0;
		for(int i = 1; i <= n; i++)
		{
			dp[i] = Math.min(dp[i-1] + x, dp[i]);
			if(i%2 == 0)
			{
				dp[i] = Math.min(dp[i/2] + y, dp[i]);
			}
			else
			{
				dp[i] = Math.min(dp[(i+1)/2] + x + y, dp[i]);
			}
			if(2*i <= n)
			{
				dp[2*i] = Math.min(dp[i] + y, dp[2*i]);
			}
			//else dp[n] = Math.min(dp[n], (2*i - n)*x + dp[i] + y);
		}
	//	System.out.println(Arrays.toString(dp));
		System.out.println(dp[n]);
	}
}

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

public class E {

	static final long INF = (long)1e18;

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

		int n = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		long[] dp = new long[n + 1];
		dp[1] = x;
		for(int i = 2; i <= n; ++i)
		{
			dp[i] = dp[i - 1] + x;
			if((i & 1) == 0)
				dp[i] = Math.min(dp[i], dp[i / 2] + y);
			else
				dp[i] = Math.min(dp[i], dp[(i + 1) / 2] + x + y);
		}
		out.println(dp[n]);
		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

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

		public Scanner(FileReader r){	br = new BufferedReader(r);}

		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 { return Double.parseDouble(next()); }

		public boolean ready() throws IOException {return br.ready();}

	}
}

/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
*/
import java.util.*;
import java.io.*;

   public class x710E
   {
      public static void main(String args[]) throws Exception
      {
         //BufferedReader infile = new BufferedReader(new FileReader("cowdate.in"));
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int X = Integer.parseInt(st.nextToken());
         int Y = Integer.parseInt(st.nextToken());
         long x = X;
         long y = Y;
         long[] dp = new long[N+1];
         dp[1] = x;
         for(int i=2; i <= N; i++)
         {
            dp[i] = dp[i-1]+x;
            if(i%2 == 0)
               dp[i] = Math.min(dp[i], dp[i/2]+y);
            else //it scales down
               dp[i] = Math.min(dp[i], x+dp[i/2+1]+y);
         }
         System.out.println(dp[N]);
      }
   }

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

@SuppressWarnings("unchecked")
public class P710E {

  class Trio implements Comparable<Trio> {
    int n, kx, ky;

    public Trio(int n, int kx, int ky) {
      this.n = n;
      this.kx = kx;
      this.ky = ky;
    }

    @Override
    public int compareTo(Trio t) {
      return ((n != t.n) ? (n - t.n) : ((kx != t.kx) ? (kx - t.kx) : (ky - t.ky)));
    }
  }

  int n, x, y, kx = Integer.MAX_VALUE, ky = Integer.MAX_VALUE;
//  boolean [] nu, kxu, kyu;
  Set<Trio> trio = new TreeSet();

  void trace(int n, int kx, int ky) {
    Trio t = new Trio(n, kx, ky);

    if (trio.contains(t) || (((long)kx * x + (long)ky * y) >= ((long)this.kx * x + (long)this.ky * y))) {
      return;
    }
//print("n=" + Integer.toBinaryString(n) + "(" + n + ")" + "\tkx=" + kx + "\tky=" + ky + "\tmkx=" + this.kx + "\tmky=" + this.ky);
//pw.flush(); System.console().readLine();

    if (n == 0) {
      if (((long)kx * x + (long)ky * y) < ((long)this.kx * x + (long)this.ky * y)) {
        this.kx = kx;
        this.ky = ky;
      }

      return;
    }

    trio.add(t);
//    nu[n] = kxu[kx] = kyu[ky] = true;

    if ((n & 0b1) == 0) {
      if (((long)(n / 2) * x) < y) {
        trace(n / 2, kx + n / 2, ky);
      } else {
        trace(n / 2, kx, ky + 1);
      }
    } else {
      trace(n - 1, kx + 1, ky);
      trace(n + 1, kx + 1, ky);
    }
  }

  public void run() throws Exception {
    int n = nextInt();
    x = nextInt();
    y = nextInt();
/*
    nu = new boolean [n * 2];
    kxu = new boolean [n * 2];
    kyu = new boolean [n * 2];
*/

    trace(n, 0, 0);

//    println(kx + "\t" + ky);
    println((long)kx * x + (long)ky * y);
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P710E().run();
    br.close();
    pw.close();
    System.err.println("\n[Time : " + (System.currentTimeMillis() - startTime) + " ms]");
  }

  static long startTime = System.currentTimeMillis();
  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

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

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { print("" + o); }
  }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print(o); println(); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }

  int gcd(int a, int b) {
    return ((b > 0) ? gcd(b, a % b) : a);
  }
}

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

@SuppressWarnings("unchecked")
public class P710E {

  class Trio implements Comparable<Trio> {
    int n, kx, ky;

    public Trio(int n, int kx, int ky) {
      this.n = n;
      this.kx = kx;
      this.ky = ky;
    }

    @Override
    public int compareTo(Trio t) {
      return ((n != t.n) ? (n - t.n) : ((kx != t.kx) ? (kx - t.kx) : (ky - t.ky)));
    }

    @Override
    public int hashCode() {
      return (n ^ kx ^ ky);
    }

    @Override
    public boolean equals(Object o) {
      Trio t = (Trio)o;
      return ((n == t.n) && (kx == t.kx) && (ky == t.ky));
    }
  }

  int n, x, y, kx = Integer.MAX_VALUE, ky = Integer.MAX_VALUE;
  Set<Trio> trio = new /*Tree*/HashSet();

  void trace(int n, int kx, int ky) {
    Trio t = new Trio(n, kx, ky);

    if (trio.contains(t) || (((long)kx * x + (long)ky * y) >= ((long)this.kx * x + (long)this.ky * y))) {
      return;
    }

    if (n == 0) {
      if (((long)kx * x + (long)ky * y) < ((long)this.kx * x + (long)this.ky * y)) {
        this.kx = kx;
        this.ky = ky;
      }

      return;
    }

    trio.add(t);

    if ((n & 0b1) == 0) {
      if (((long)(n / 2) * x) < y) {
        trace(n / 2, kx + n / 2, ky);
      } else {
        trace(n / 2, kx, ky + 1);
      }
    } else {
      trace(n - 1, kx + 1, ky);
      trace(n + 1, kx + 1, ky);
    }
  }

  public void run() throws Exception {
    int n = nextInt();
    x = nextInt();
    y = nextInt();

    trace(n, 0, 0);

    println((long)kx * x + (long)ky * y);
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P710E().run();
    br.close();
    pw.close();
    System.err.println("\n[Time : " + (System.currentTimeMillis() - startTime) + " ms]");
  }

  static long startTime = System.currentTimeMillis();
  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

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

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { print("" + o); }
  }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print(o); println(); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }

  int gcd(int a, int b) {
    return ((b > 0) ? gcd(b, a % b) : a);
  }
}

/**
 * Created by ankeet on 8/22/16.
 */
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class E710 {

    static FastReader in = null;
    static PrintWriter out = null;

    public static void solve()
    {
        int n = in.nint();
        long x = in.nint();
        long y = in.nint();
        long[] dp = new long[n+1];
        dp[1] = x;
        for(int i=2; i<=n; i++) dp[i] = Math.min(dp[i-1]+x, dp[(i+1)/2]+y+(i%2)*x);
        out.println(dp[n]);
    }

    public static void main(String[] args)
    {
        in = new FastReader(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.flush();
        out.close();

    }

    static class FastReader {

        BufferedReader read;
        StringTokenizer tokenizer;

        public FastReader(InputStream in)
        {
            read = new BufferedReader(new InputStreamReader(in));
        }

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

        public int nint()
        {
            return Integer.parseInt(next());
        }
        public long nlong()
        {
            return Long.parseLong(next());
        }
        public double ndouble()
        {
            return Double.parseDouble(next());
        }

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

        public long[] nlarr(int n)
        {
            long[] a = new long[n];
            for(int i=0; i<n; ++i)
            {
                a[i] = nlong();
            }
            return a;
        }
    }

}

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.io.InputStream;

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

  static class TaskE {
    static int maxDouble = 26;
    int n;
    long x;
    long y;

    public void solve(int testNumber, QuickScanner in, QuickWriter out) {
      n = in.nextInt();
      x = in.nextInt();
      y = in.nextInt();
      long res = x * n;
      for (int d = 1; d < maxDouble; ++d) {
        int bit = n / (1 << d);
        res = Math.min(Math.min(
            res,
            x * (bit + calc(Math.abs(n - (1 << d) * bit))) + y * d),
            x * (bit + 1 + calc(Math.abs(n - (1 << d) * (bit + 1)))) + y * d);
      }
      out.println(res);
    }

    int calc(int x) {
      int res = 0;
      while (x > 0) {
        if ((x & 1) == 0) {
          x >>= Integer.numberOfTrailingZeros(x);
          continue;
        }
        ++res;
        if ((x & 2) == 0) {
          x >>= 1;
          continue;
        }
        ++x;
      }
      return res;
    }

  }

  static class QuickScanner {
    private static final int BUFFER_SIZE = 1024;
    private InputStream stream;
    private byte[] buffer;
    private int currentPostion;
    private int numberOfChars;

    public QuickScanner(InputStream stream) {
      this.stream = stream;
      this.buffer = new byte[BUFFER_SIZE];
      this.currentPostion = 0;
      this.numberOfChars = 0;
    }

    public int nextInt() {
      int c = nextNonSpaceChar();
      boolean positive = true;
      if (c == '-') {
        positive = false;
        c = nextChar();
      }
      int res = 0;
      do {
        if (c < '0' || '9' < c) throw new RuntimeException();
        res = res * 10 + c - '0';
        c = nextChar();
      } while (!isSpaceChar(c));
      return positive ? res : -res;
    }

    public int nextNonSpaceChar() {
      int res = nextChar();
      for (; isSpaceChar(res) || res < 0; res = nextChar()) ;
      return res;
    }

    public int nextChar() {
      if (numberOfChars == -1) {
        throw new RuntimeException();
      }
      if (currentPostion >= numberOfChars) {
        currentPostion = 0;
        try {
          numberOfChars = stream.read(buffer);
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
        if (numberOfChars <= 0) {
          return -1;
        }
      }
      return buffer[currentPostion++];
    }

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

  }

  static class QuickWriter {
    private final PrintWriter writer;

    public QuickWriter(OutputStream outputStream) {
      this.writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public QuickWriter(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 println(Object... objects) {
      print(objects);
      writer.print('\n');
    }

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

  }
}

import java.util.Scanner;

public class GenerateString {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		long[] dp = new long[n+1];
		int x = scan.nextInt();
		int y = scan.nextInt();
		dp[1] = x;
		for(int i = 2; i <= n; i++){
			dp[i] = Math.min(dp[i-1]+x, dp[(i+1)/2]+y+(i%2)*x);
		}
		System.out.println(dp[n]);
	}
}

import java.util.Scanner;

public class qwe {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		long[] dp = new long[n+1];
		int x = scan.nextInt();
		int y = scan.nextInt();
		dp[1] = x;
		for(int i = 2; i <= n; i++){
			dp[i] = Math.min(dp[i-1]+x, dp[(i+1)/2]+y+(i%2)*x);
		}
		System.out.println(dp[n]);
	}
}

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Map;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Stack;

import java.util.Queue;

/**
 * Using FastReader and Output Class
 *
 * @author Wallace
 */
 public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        IAMBACK solver = new IAMBACK();
        solver.solve(1, in, out);
        out.close();
    }
    static class IAMBACK {

        static Queue<Integer> stack = new LinkedList<>();
        static long l,c;
        static int n;
        public void solve(int testNumber, FastReader in, PrintWriter out) {
             n=in.nextInt();
             l=in.nextLong();
             c=in.nextLong();
           long ans[]=new long[n+5];
          ans[1]=l;
          for(int i=2;i<=n;i++) {
                if(i%2==0) {
                    ans[i]=(long)Math.min(ans[i-1]+l,ans[i/2]+c);
                }else {
                    ans[i]=(long)Math.min(ans[i-1]+l,ans[(i+1)/2]+c+l);
                }
          }
           out.println(ans[n]);
        }

        }

    // for the fastreader
    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;

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

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

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

        public String next() {
            return nextString();
        }

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

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

        // pcwallace
        public double[] nextDoubleArray(int n) {
            double[] array = new double[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextDouble();
            }
            return array;
        }

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

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

        public double nextDouble() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            double res = 0.0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
    }
}

import java.awt.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
import java.util.List;

import static java.lang.Math.max;
import static java.lang.Math.min;

public class EE implements Runnable{

    private final static Random rnd = new Random();

    // SOLUTION!!!
    // HACK ME PLEASE IF YOU CAN!!!
    // PLEASE!!!
    // PLEASE!!!
    // PLEASE!!!

    private static final long INF = Long.MAX_VALUE / 2;

    private static class LongStack {

        private final long[] values;
        private int size;

        LongStack(int size) {
            this.values = new long[size];
            this.size = 0;
        }

        void push(long value) {
            values[size] = value;
            ++size;
        }

        long peek() {
            return (0 == size ? INF : values[size - 1]);
        }

        long poll() {
            --size;
            return values[size];
        }
    }

    private static class MinimumStack {

        private final LongStack stack, stackMin;

        MinimumStack(int size) {
            this.stack = new LongStack(size);
            this.stackMin = new LongStack(size);
        }

        int size() {
            return stack.size;
        }

        long getMin() {
            return stackMin.peek();
        }

        void push(long value) {
            long min = min(getMin(), value);
            stack.push(value);
            stackMin.push(min);
        }

        long poll() {
            stackMin.poll();
            return stack.poll();
        }
    }

    private static class MinimumQueue {

        private final MinimumStack back, front;

        MinimumQueue(int size) {
            this.back = new MinimumStack(size);
            this.front = new MinimumStack(size);
        }

        int size() {
            return back.size() + front.size();
        }

        long getMin() {
            return min(back.getMin(), front.getMin());
        }

        void push(long value) {
            back.push(value);
        }

        long poll() {
            if (front.size() == 0) {
                while (back.size() > 0) {
                    front.push(back.poll());
                }
            }

            return front.poll();
        }
    }

    private void solve() {
        int n = readInt();

        long x = readInt();
        long y = readInt();

        long answer = getAnswer(n, x, y);
        out.println(answer);
    }

    private static long getAnswer(int n, long x, long y) {
        long[] dp = new long[n + 2];

        long prevDp = 0;
        for (int size = 1; size < dp.length; ++size) {
            long curDp = min(INF, prevDp + x);

            if (0 == (size & 1)) {
                int halfSize = size >> 1;
                long halfDp = dp[halfSize];

                curDp = min(curDp, halfDp + y);
                dp[size - 1] = min(dp[size - 1], curDp + x);
            }

            dp[size] = curDp;
            prevDp = curDp;
        }

        return dp[n];
    }

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

    private final static boolean FIRST_INPUT_STRING = false;
    private final static boolean MULTIPLE_TESTS = true;
    private final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private final static int MAX_STACK_SIZE = 128;

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

    public void run(){
        try{
            timeInit();
            Locale.setDefault(Locale.US);

            init();

            if (ONLINE_JUDGE) {
                solve();
            } else {
                do {
                    try {
                        timeInit();
                        solve();
                        time();

                        out.println();
                    } catch (NumberFormatException e) {
                        break;
                    } catch (NullPointerException e) {
                        if (FIRST_INPUT_STRING) break;
                        else throw e;
                    }
                } while (MULTIPLE_TESTS);
            }

            out.close();
            time();
        }catch (Exception e){
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

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

    private BufferedReader in;
    private OutputWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args){
        new Thread(null, new EE(), "", MAX_STACK_SIZE * (1L << 20)).start();
    }

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

    private void init() throws FileNotFoundException{
        Locale.setDefault(Locale.US);

        if (ONLINE_JUDGE){
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new OutputWriter(System.out);
        }else{
            in = new BufferedReader(new FileReader("input.txt"));
            out = new OutputWriter("output.txt");
        }
    }

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

    private long timeBegin;

    private void timeInit() {
        this.timeBegin = System.currentTimeMillis();
    }

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

    private void debug(Object... objects){
        if (ONLINE_JUDGE){
            for (Object o: objects){
                System.err.println(o.toString());
            }
        }
    }

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

    private String delim = " ";

    private String readLine() {
        try {
            return in.readLine();
        } catch (IOException e) {
            throw new RuntimeIOException(e);
        }
    }

    private String readString() {
        try {
            while(!tok.hasMoreTokens()){
                tok = new StringTokenizer(readLine());
            }

            return tok.nextToken(delim);
        } catch (NullPointerException e) {
            return null;
        }
    }

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

    private final char NOT_A_SYMBOL = '\0';

    private char readChar() {
        try {
            int intValue = in.read();

            if (intValue == -1){
                return NOT_A_SYMBOL;
            }

            return (char) intValue;
        } catch (IOException e) {
            throw new RuntimeIOException(e);
        }
    }

    private char[] readCharArray() {
        return readLine().toCharArray();
    }

    private char[][] readCharField(int rowsCount) {
        char[][] field = new char[rowsCount][];
        for (int row = 0; row < rowsCount; ++row) {
            field[row] = readCharArray();
        }

        return field;
    }

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

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

    private int[] readIntArray(int size) {
        int[] array = new int[size];

        for (int index = 0; index < size; ++index){
            array[index] = readInt();
        }

        return array;
    }

    private int[] readSortedIntArray(int size) {
        Integer[] array = new Integer[size];

        for (int index = 0; index < size; ++index) {
            array[index] = readInt();
        }
        Arrays.sort(array);

        int[] sortedArray = new int[size];
        for (int index = 0; index < size; ++index) {
            sortedArray[index] = array[index];
        }

        return sortedArray;
    }

    private int[] readIntArrayWithDecrease(int size) {
        int[] array = readIntArray(size);

        for (int i = 0; i < size; ++i) {
            array[i]--;
        }

        return array;
    }

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

    private int[][] readIntMatrix(int rowsCount, int columnsCount) {
        int[][] matrix = new int[rowsCount][];

        for (int rowIndex = 0; rowIndex < rowsCount; ++rowIndex) {
            matrix[rowIndex] = readIntArray(columnsCount);
        }

        return matrix;
    }

    private int[][] readIntMatrixWithDecrease(int rowsCount, int columnsCount) {
        int[][] matrix = new int[rowsCount][];

        for (int rowIndex = 0; rowIndex < rowsCount; ++rowIndex) {
            matrix[rowIndex] = readIntArrayWithDecrease(columnsCount);
        }

        return matrix;
    }

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

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

    private long[] readLongArray(int size) {
        long[] array = new long[size];

        for (int index = 0; index < size; ++index){
            array[index] = readLong();
        }

        return array;
    }

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

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

    private double[] readDoubleArray(int size) {
        double[] array = new double[size];

        for (int index = 0; index < size; ++index){
            array[index] = readDouble();
        }

        return array;
    }

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

    private BigInteger readBigInteger() {
        return new BigInteger(readString());
    }

    private BigDecimal readBigDecimal() {
        return new BigDecimal(readString());
    }

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

    private Point readPoint() {
        int x = readInt();
        int y = readInt();
        return new Point(x, y);
    }

    private Point[] readPointArray(int size) {
        Point[] array = new Point[size];

        for (int index = 0; index < size; ++index){
            array[index] = readPoint();
        }

        return array;
    }

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

    private List<Integer>[] readGraph(int vertexNumber, int edgeNumber) {
        @SuppressWarnings("unchecked")
        List<Integer>[] graph = new List[vertexNumber];

        for (int index = 0; index < vertexNumber; ++index){
            graph[index] = new ArrayList<Integer>();
        }

        while (edgeNumber-- > 0){
            int from = readInt() - 1;
            int to = readInt() - 1;

            graph[from].add(to);
            graph[to].add(from);
        }

        return graph;
    }

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

    private static class IntIndexPair {

        static Comparator<IntIndexPair> increaseComparator = new Comparator<EE.IntIndexPair>() {

            @Override
            public int compare(EE.IntIndexPair indexPair1, EE.IntIndexPair indexPair2) {
                int value1 = indexPair1.value;
                int value2 = indexPair2.value;

                if (value1 != value2) return value1 - value2;

                int index1 = indexPair1.index;
                int index2 = indexPair2.index;

                return index1 - index2;
            }
        };

        static Comparator<IntIndexPair> decreaseComparator = new Comparator<EE.IntIndexPair>() {

            @Override
            public int compare(EE.IntIndexPair indexPair1, EE.IntIndexPair indexPair2) {
                int value1 = indexPair1.value;
                int value2 = indexPair2.value;

                if (value1 != value2) return -(value1 - value2);

                int index1 = indexPair1.index;
                int index2 = indexPair2.index;

                return index1 - index2;
            }
        };

        int value, index;

        IntIndexPair(int value, int index) {
            super();
            this.value = value;
            this.index = index;
        }

        int getRealIndex() {
            return index + 1;
        }
    }

    private IntIndexPair[] readIntIndexArray(int size) {
        IntIndexPair[] array = new IntIndexPair[size];

        for (int index = 0; index < size; ++index) {
            array[index] = new IntIndexPair(readInt(), index);
        }

        return array;
    }

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

    private static class OutputWriter extends PrintWriter {

        final int DEFAULT_PRECISION = 12;

        private int precision;
        private String format, formatWithSpace;

        {
            precision = DEFAULT_PRECISION;

            format = createFormat(precision);
            formatWithSpace = format + " ";
        }

        OutputWriter(OutputStream out) {
            super(out);
        }

        OutputWriter(String fileName) throws FileNotFoundException {
            super(fileName);
        }

        int getPrecision() {
            return precision;
        }

        void setPrecision(int precision) {
            precision = max(0, precision);
            this.precision = precision;

            format = createFormat(precision);
            formatWithSpace = format + " ";
        }

        String createFormat(int precision){
            return "%." + precision + "f";
        }

        @Override
        public void print(double d){
            printf(format, d);
        }

        void printWithSpace(double d){
            printf(formatWithSpace, d);
        }

        void printAll(double...d){
            for (int i = 0; i < d.length - 1; ++i){
                printWithSpace(d[i]);
            }

            print(d[d.length - 1]);
        }

        @Override
        public void println(double d){
            printlnAll(d);
        }

        void printlnAll(double... d){
            printAll(d);
            println();
        }
    }

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

    private static class RuntimeIOException extends RuntimeException {

        /**
         *
         */
        private static final long serialVersionUID = -6463830523020118289L;

        RuntimeIOException(Throwable cause) {
            super(cause);
        }
    }

    /////////////////////////////////////////////////////////////////////
    //////////////// Some useful constants and functions ////////////////
    /////////////////////////////////////////////////////////////////////

    private static final int[][] steps = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
    private static final int[][] steps8 = {
            {-1, 0}, {1, 0}, {0, -1}, {0, 1},
            {-1, -1}, {1, 1}, {1, -1}, {-1, 1}
    };

    private static boolean checkCell(int row, int rowsCount, int column, int columnsCount) {
        return checkIndex(row, rowsCount) && checkIndex(column, columnsCount);
    }

    private static boolean checkIndex(int index, int lim){
        return (0 <= index && index < lim);
    }

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

    private static boolean checkBit(int mask, int bit){
        return (mask & (1 << bit)) != 0;
    }

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

    private static long getSum(int[] array) {
        long sum = 0;
        for (int value: array) {
            sum += value;
        }

        return sum;
    }

    private static Point getMinMax(int[] array) {
        int min = array[0];
        int max = array[0];

        for (int index = 0, size = array.length; index < size; ++index, ++index) {
            int value = array[index];

            if (index == size - 1) {
                min = min(min, value);
                max = max(max, value);
            } else {
                int otherValue = array[index + 1];

                if (value <= otherValue) {
                    min = min(min, value);
                    max = max(max, otherValue);
                } else {
                    min = min(min, otherValue);
                    max = max(max, value);
                }
            }
        }

        return new Point(min, max);
    }

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

    private static int[] getPrimes(int n) {
        boolean[] used = new boolean[n];
        used[0] = used[1] = true;

        int size = 0;
        for (int i = 2; i < n; ++i) {
            if (!used[i]) {
                ++size;
                for (int j = 2 * i; j < n; j += i) {
                    used[j] = true;
                }
            }
        }

        int[] primes = new int[size];
        for (int i = 0, cur = 0; i < n; ++i) {
            if (!used[i]) {
                primes[cur++] = i;
            }
        }

        return primes;
    }

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

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

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

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

    private static class IdMap<KeyType> extends HashMap<KeyType, Integer> {

        /**
         *
         */
        private static final long serialVersionUID = -3793737771950984481L;

        public IdMap() {
            super();
        }

        int getId(KeyType key) {
            Integer id = super.get(key);
            if (id == null) {
                super.put(key, id = size());
            }

            return id;
        }
    }
}

import java.awt.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
import java.util.List;

import static java.lang.Math.max;
import static java.lang.Math.min;

public class EE implements Runnable{

    private final static Random rnd = new Random();

    // SOLUTION!!!
    // HACK ME PLEASE IF YOU CAN!!!
    // PLEASE!!!
    // PLEASE!!!
    // PLEASE!!!

    private static final long INF = Long.MAX_VALUE / 2;

    private static class LongStack {

        private final long[] values;
        private int size;

        LongStack(int size) {
            this.values = new long[size];
            this.size = 0;
        }

        void push(long value) {
            values[size] = value;
            ++size;
        }

        long peek() {
            return (0 == size ? INF : values[size - 1]);
        }

        long poll() {
            --size;
            return values[size];
        }
    }

    private static class MinimumStack {

        private final LongStack stack, stackMin;

        MinimumStack(int size) {
            this.stack = new LongStack(size);
            this.stackMin = new LongStack(size);
        }

        int size() {
            return stack.size;
        }

        long getMin() {
            return stackMin.peek();
        }

        void push(long value) {
            long min = min(getMin(), value);
            stack.push(value);
            stackMin.push(min);
        }

        long poll() {
            stackMin.poll();
            return stack.poll();
        }
    }

    private static class MinimumQueue {

        private final MinimumStack back, front;

        MinimumQueue(int size) {
            this.back = new MinimumStack(size);
            this.front = new MinimumStack(size);
        }

        int size() {
            return back.size() + front.size();
        }

        long getMin() {
            return min(back.getMin(), front.getMin());
        }

        void push(long value) {
            back.push(value);
        }

        long poll() {
            if (front.size() == 0) {
                while (back.size() > 0) {
                    front.push(back.poll());
                }
            }

            return front.poll();
        }
    }

    private void solve() {
        int n = readInt();

        long x = readInt();
        long y = readInt();

        long answer = getAnswer(n, x, y);
        out.println(answer);
    }

    private static long getAnswer(int n, long x, long y) {
        MinimumQueue queue = new MinimumQueue(n + 2);

        long answer = INF;

        long prevDp = 0;
        for (int size = 1, sizeLimit = (n << 1); size <= sizeLimit; ++size) {
            long curDp = min(INF, prevDp + x);

            if (0 == (size & 1)) {
                int halfSize = size >> 1;
                while (queue.size() > halfSize) {
                    queue.poll();
                }

                long halfDp = queue.getMin() - halfSize * x;
                if (n == halfSize) {
                    answer = min(answer, halfDp);
                }

                curDp = min(curDp, halfDp + y);
            }

            queue.push(curDp + size * x);
            prevDp = curDp;

            if (n == size) {
                answer = min(answer, curDp);
            }
        }

        return answer;
    }

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

    private final static boolean FIRST_INPUT_STRING = false;
    private final static boolean MULTIPLE_TESTS = true;
    private final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private final static int MAX_STACK_SIZE = 128;

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

    public void run(){
        try{
            timeInit();
            Locale.setDefault(Locale.US);

            init();

            if (ONLINE_JUDGE) {
                solve();
            } else {
                do {
                    try {
                        timeInit();
                        solve();
                        time();

                        out.println();
                    } catch (NumberFormatException e) {
                        break;
                    } catch (NullPointerException e) {
                        if (FIRST_INPUT_STRING) break;
                        else throw e;
                    }
                } while (MULTIPLE_TESTS);
            }

            out.close();
            time();
        }catch (Exception e){
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

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

    private BufferedReader in;
    private OutputWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args){
        new Thread(null, new EE(), "", MAX_STACK_SIZE * (1L << 20)).start();
    }

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

    private void init() throws FileNotFoundException{
        Locale.setDefault(Locale.US);

        if (ONLINE_JUDGE){
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new OutputWriter(System.out);
        }else{
            in = new BufferedReader(new FileReader("input.txt"));
            out = new OutputWriter("output.txt");
        }
    }

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

    private long timeBegin;

    private void timeInit() {
        this.timeBegin = System.currentTimeMillis();
    }

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

    private void debug(Object... objects){
        if (ONLINE_JUDGE){
            for (Object o: objects){
                System.err.println(o.toString());
            }
        }
    }

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

    private String delim = " ";

    private String readLine() {
        try {
            return in.readLine();
        } catch (IOException e) {
            throw new RuntimeIOException(e);
        }
    }

    private String readString() {
        try {
            while(!tok.hasMoreTokens()){
                tok = new StringTokenizer(readLine());
            }

            return tok.nextToken(delim);
        } catch (NullPointerException e) {
            return null;
        }
    }

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

    private final char NOT_A_SYMBOL = '\0';

    private char readChar() {
        try {
            int intValue = in.read();

            if (intValue == -1){
                return NOT_A_SYMBOL;
            }

            return (char) intValue;
        } catch (IOException e) {
            throw new RuntimeIOException(e);
        }
    }

    private char[] readCharArray() {
        return readLine().toCharArray();
    }

    private char[][] readCharField(int rowsCount) {
        char[][] field = new char[rowsCount][];
        for (int row = 0; row < rowsCount; ++row) {
            field[row] = readCharArray();
        }

        return field;
    }

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

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

    private int[] readIntArray(int size) {
        int[] array = new int[size];

        for (int index = 0; index < size; ++index){
            array[index] = readInt();
        }

        return array;
    }

    private int[] readSortedIntArray(int size) {
        Integer[] array = new Integer[size];

        for (int index = 0; index < size; ++index) {
            array[index] = readInt();
        }
        Arrays.sort(array);

        int[] sortedArray = new int[size];
        for (int index = 0; index < size; ++index) {
            sortedArray[index] = array[index];
        }

        return sortedArray;
    }

    private int[] readIntArrayWithDecrease(int size) {
        int[] array = readIntArray(size);

        for (int i = 0; i < size; ++i) {
            array[i]--;
        }

        return array;
    }

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

    private int[][] readIntMatrix(int rowsCount, int columnsCount) {
        int[][] matrix = new int[rowsCount][];

        for (int rowIndex = 0; rowIndex < rowsCount; ++rowIndex) {
            matrix[rowIndex] = readIntArray(columnsCount);
        }

        return matrix;
    }

    private int[][] readIntMatrixWithDecrease(int rowsCount, int columnsCount) {
        int[][] matrix = new int[rowsCount][];

        for (int rowIndex = 0; rowIndex < rowsCount; ++rowIndex) {
            matrix[rowIndex] = readIntArrayWithDecrease(columnsCount);
        }

        return matrix;
    }

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

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

    private long[] readLongArray(int size) {
        long[] array = new long[size];

        for (int index = 0; index < size; ++index){
            array[index] = readLong();
        }

        return array;
    }

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

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

    private double[] readDoubleArray(int size) {
        double[] array = new double[size];

        for (int index = 0; index < size; ++index){
            array[index] = readDouble();
        }

        return array;
    }

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

    private BigInteger readBigInteger() {
        return new BigInteger(readString());
    }

    private BigDecimal readBigDecimal() {
        return new BigDecimal(readString());
    }

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

    private Point readPoint() {
        int x = readInt();
        int y = readInt();
        return new Point(x, y);
    }

    private Point[] readPointArray(int size) {
        Point[] array = new Point[size];

        for (int index = 0; index < size; ++index){
            array[index] = readPoint();
        }

        return array;
    }

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

    private List<Integer>[] readGraph(int vertexNumber, int edgeNumber) {
        @SuppressWarnings("unchecked")
        List<Integer>[] graph = new List[vertexNumber];

        for (int index = 0; index < vertexNumber; ++index){
            graph[index] = new ArrayList<Integer>();
        }

        while (edgeNumber-- > 0){
            int from = readInt() - 1;
            int to = readInt() - 1;

            graph[from].add(to);
            graph[to].add(from);
        }

        return graph;
    }

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

    private static class IntIndexPair {

        static Comparator<IntIndexPair> increaseComparator = new Comparator<EE.IntIndexPair>() {

            @Override
            public int compare(EE.IntIndexPair indexPair1, EE.IntIndexPair indexPair2) {
                int value1 = indexPair1.value;
                int value2 = indexPair2.value;

                if (value1 != value2) return value1 - value2;

                int index1 = indexPair1.index;
                int index2 = indexPair2.index;

                return index1 - index2;
            }
        };

        static Comparator<IntIndexPair> decreaseComparator = new Comparator<EE.IntIndexPair>() {

            @Override
            public int compare(EE.IntIndexPair indexPair1, EE.IntIndexPair indexPair2) {
                int value1 = indexPair1.value;
                int value2 = indexPair2.value;

                if (value1 != value2) return -(value1 - value2);

                int index1 = indexPair1.index;
                int index2 = indexPair2.index;

                return index1 - index2;
            }
        };

        int value, index;

        IntIndexPair(int value, int index) {
            super();
            this.value = value;
            this.index = index;
        }

        int getRealIndex() {
            return index + 1;
        }
    }

    private IntIndexPair[] readIntIndexArray(int size) {
        IntIndexPair[] array = new IntIndexPair[size];

        for (int index = 0; index < size; ++index) {
            array[index] = new IntIndexPair(readInt(), index);
        }

        return array;
    }

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

    private static class OutputWriter extends PrintWriter {

        final int DEFAULT_PRECISION = 12;

        private int precision;
        private String format, formatWithSpace;

        {
            precision = DEFAULT_PRECISION;

            format = createFormat(precision);
            formatWithSpace = format + " ";
        }

        OutputWriter(OutputStream out) {
            super(out);
        }

        OutputWriter(String fileName) throws FileNotFoundException {
            super(fileName);
        }

        int getPrecision() {
            return precision;
        }

        void setPrecision(int precision) {
            precision = max(0, precision);
            this.precision = precision;

            format = createFormat(precision);
            formatWithSpace = format + " ";
        }

        String createFormat(int precision){
            return "%." + precision + "f";
        }

        @Override
        public void print(double d){
            printf(format, d);
        }

        void printWithSpace(double d){
            printf(formatWithSpace, d);
        }

        void printAll(double...d){
            for (int i = 0; i < d.length - 1; ++i){
                printWithSpace(d[i]);
            }

            print(d[d.length - 1]);
        }

        @Override
        public void println(double d){
            printlnAll(d);
        }

        void printlnAll(double... d){
            printAll(d);
            println();
        }
    }

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

    private static class RuntimeIOException extends RuntimeException {

        /**
         *
         */
        private static final long serialVersionUID = -6463830523020118289L;

        RuntimeIOException(Throwable cause) {
            super(cause);
        }
    }

    /////////////////////////////////////////////////////////////////////
    //////////////// Some useful constants and functions ////////////////
    /////////////////////////////////////////////////////////////////////

    private static final int[][] steps = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
    private static final int[][] steps8 = {
            {-1, 0}, {1, 0}, {0, -1}, {0, 1},
            {-1, -1}, {1, 1}, {1, -1}, {-1, 1}
    };

    private static boolean checkCell(int row, int rowsCount, int column, int columnsCount) {
        return checkIndex(row, rowsCount) && checkIndex(column, columnsCount);
    }

    private static boolean checkIndex(int index, int lim){
        return (0 <= index && index < lim);
    }

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

    private static boolean checkBit(int mask, int bit){
        return (mask & (1 << bit)) != 0;
    }

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

    private static long getSum(int[] array) {
        long sum = 0;
        for (int value: array) {
            sum += value;
        }

        return sum;
    }

    private static Point getMinMax(int[] array) {
        int min = array[0];
        int max = array[0];

        for (int index = 0, size = array.length; index < size; ++index, ++index) {
            int value = array[index];

            if (index == size - 1) {
                min = min(min, value);
                max = max(max, value);
            } else {
                int otherValue = array[index + 1];

                if (value <= otherValue) {
                    min = min(min, value);
                    max = max(max, otherValue);
                } else {
                    min = min(min, otherValue);
                    max = max(max, value);
                }
            }
        }

        return new Point(min, max);
    }

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

    private static int[] getPrimes(int n) {
        boolean[] used = new boolean[n];
        used[0] = used[1] = true;

        int size = 0;
        for (int i = 2; i < n; ++i) {
            if (!used[i]) {
                ++size;
                for (int j = 2 * i; j < n; j += i) {
                    used[j] = true;
                }
            }
        }

        int[] primes = new int[size];
        for (int i = 0, cur = 0; i < n; ++i) {
            if (!used[i]) {
                primes[cur++] = i;
            }
        }

        return primes;
    }

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

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

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

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

    private static class IdMap<KeyType> extends HashMap<KeyType, Integer> {

        /**
         *
         */
        private static final long serialVersionUID = -3793737771950984481L;

        public IdMap() {
            super();
        }

        int getId(KeyType key) {
            Integer id = super.get(key);
            if (id == null) {
                super.put(key, id = size());
            }

            return id;
        }
    }
}

import java.io.IOException;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Scanner;

import static java.lang.Integer.parseInt;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner terminalInput = new Scanner(System.in);
        String s = terminalInput.nextLine();
        Scanner sc = new Scanner(s);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        long[] array = new long[2 * n + 2];
        long a = (long) Math.pow(10, 18);
        for (int i = 0; i < 2 * n + 2; i++) {
            array[i] = a;
        }
        for (int i = 1; i < n + 1; i++) {
            if (i == 1){
                array[i] = (long) x;
            }
            else if (i == 2){
                array[2] = Math.min(array[1] + y, array[1] + x);
            }
            else{
                if (i % 2 != 0) {
                    array[i] = Math.min(Math.min(array[i], array[i + 1] + x), array[i - 1] + x);
                } else {
                    array[i] = Math.min(Math.min(array[i], array[i + 1] + x), array[i - 1] + x);
                }
            }
            array[2 * i] = array[i] + y;
        }
        for (int i = 2 * n; i >= n; i--){
            array[i] = Math.min(Math.min(array[i + 1] + x, array[i - 1] + x), array[i]);
        }
        System.out.println(array[n]);
    }
}

/**
 * @(#)GenerateString.java
 *
 *
 * @author
 * @version 1.00 2016/11/3
 */
import java.util.Scanner;

public class GenerateString {
    public static void main(String[] args) {
       Scanner kbd = new Scanner(System.in);
		int n = kbd.nextInt();
		int x = kbd.nextInt();
		int y = kbd.nextInt();
		long[] c = new long[n+1];
		c[1] = x;
		for (int i = 2; i <= n; i++) {
			c[i] = Math.min(c[i-1]+x, Math.min(c[i/2], c[(i+1)/2]) + y + (i-(i/2)*2)*x);
		}
		System.out.println(c[n]);

    }
}

public class A {
	public static void main(String[] args) {

	}
}

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		int y = in.nextInt();
		long[] dp = new long[n + 1];
		dp[0] = 0;
		dp[1] = x;
		dp[2] = Math.min(x, y) + x;
		//System.out.print(0 + " " + x + " " + dp[2]);
		for (int i = 3; i <= n; i++) {
			long min = dp[i - 1] + x;
			if (i % 2 == 0)
				min = Math.min(min, dp[i / 2] + y);
			else
				min = Math.min(min, dp[(i-1)/2] + y + x);
			dp[i] = min;
			//System.out.print(" " + dp[i]);
		}
		//System.out.println();
		System.out.println(dp[n]);
	}
}

import java.util.Scanner;
public class Generetor {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int x=sc.nextInt();
        int y=sc.nextInt();
        long k=0;
        while (n>0) {
            if (n%2==0)if (n/2>y/x) {n/=2; k+=y;} else {k+=n*x; n=0;} else if((n+1)%4==0&&(n-1)%4>0){n+=1; k+=x;} else {n-=1; k+=x;}
        }
        System.out.print(k);
    }
}

import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.OutputStream;
public class E {
	public static void main(String args[]) {
		Sc sc = new Sc(System.in);
		long t = 0;
		int n = sc.nI();
		int x = sc.nI();
		int y = sc.nI();
		while(n>0) {
			if(n%2 != 0) {
				t += x;
				n--;
			}
			if(n/2*x < y) {
				t += n*x;
				n = 0;
			} else {
				t += y;
				n /= 2;
			}
		}
		System.out.println(t);
	}
}
class Sc {
    public Sc(InputStream i) {
        r = new BufferedReader(new InputStreamReader(i));
    }

    public boolean hasM() {
        return peekToken() != null;
    }

    public int nI() {
        return Integer.parseInt(nextToken());
    }

    public double nD() {
        return Double.parseDouble(nextToken());
    }

    public long nL() {
        return Long.parseLong(nextToken());
    }

    public String n() {
        return nextToken();
    }

    private BufferedReader r;
    private String line;
    private StringTokenizer st;
    private String token;

    private String peekToken() {
        if (token == null)
            try {
                while (st == null || !st.hasMoreTokens()) {
                    line = r.readLine();
                    if (line == null) return null;
                    st = new StringTokenizer(line);
                }
                token = st.nextToken();
            } catch (IOException e) { }
        return token;
    }

    private String nextToken() {
        String ans = peekToken();
        token = null;
        return ans;
    }
}

import javax.swing.*;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;

public class Test {

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        int target = in.nextInt(), addCost = in.nextInt(), doubleCost = in.nextInt();
        long[] best = new long[target+1];
        PriorityQueue<Integer> heap = new PriorityQueue<>(new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return Long.compare(best[o1],best[o2]);
            }
        });
        Arrays.fill(best, Long.MAX_VALUE);
        heap.add(0);
        best[0] = 0;

        while (heap.size() > 0) {
            int node = heap.remove();
           // System.out.println(node);
            if (node == target || best[node] >= best[target]) {
                System.out.println(best[target]);
                return;
            }
            long c1 = best[node]+addCost;
            if (node > 0 && best[node-1] > c1) {
                heap.add(node-1);
                best[node-1] = c1;
            }
            int n2 = node*2;
            long c2 = best[node]+doubleCost;
            if (n2 > target) best[target] = Math.min(best[target], c2 + addCost*(n2-target));
            else if (best[n2] > c2) {
                best[n2] = c2;
                heap.add(n2);
            }
            if (best[node+1] > best[node]+addCost) {
                best[node+1] = best[node]+addCost;
                heap.add(node+1);
            }
        }
    } //85 -> 84 -> 42 -> 21 -> 20 -> 10 -> 5 -> 4 -> 2 -> 1 4dd 6 double

    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(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 int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public double nextDouble() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E') {
                    return res * Math.pow(10, nextInt());
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = snext();
            }
            if (c == '.') {
                c = snext();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E') {
                        return res * Math.pow(10, nextInt());
                    }
                    if (c < '0' || c > '9') {
                        throw new InputMismatchException();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = snext();
                }
            }
            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 String nextLine() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isEndOfLine(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;
        }

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

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

}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int insertWeight = input.nextInt();
        int doubleWeight = input.nextInt();

        int ans[] = new int[n + 1];
        ans[0] = 0;
        ans[1] = insertWeight;
        for (int i = 2; i < n+1; i++) {
            if (i % 2 == 1) {
                ans[i] = Math.min(ans[(i - 1)] + insertWeight, ans[(i + 1) / 2] + insertWeight + doubleWeight);
            } else {
                ans[i] = Math.min(ans[i / 2] + doubleWeight, ans[i / 2] + insertWeight * i / 2);

            }
        }

        System.out.print(ans[n]);
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {

	static class Task {

		int NN = 300005;
		int MOD = 1000000007;
		int INF = 2000000000;
		long INFINITY = 2000000000000000000L;

		long [] dp = new long[20000005];
		long x, y;int n;

		long rec(int k) {
			if(dp[k] != -1)
				return dp[k];
			if(k == 0) {
				return dp[k] = rec(k + 1) + x;
			}
			if(k == n)
				return dp[k] = 0;
			if(k < n)
				return dp[k] = Math.min(rec(k*2) + y, rec(k+1)+x);
			return dp[k] = 1L*(k-n)*x;
		}

		public void solve(InputReader in, PrintWriter out) {
			for(int i=0;i<20000005;++i)
				dp[i] = -1;
			int n = in.nextInt();
			x = in.nextLong();
			y = in.nextLong();
			out.println(rec(0));
		}
	}

	static void prepareIO(boolean isFileIO) {
		//long t1 = System.currentTimeMillis();
		Task solver = new Task();
		// Standard IO
		if(!isFileIO) {
			InputStream inputStream = System.in;
	        OutputStream outputStream = System.out;
	        InputReader in = new InputReader(inputStream);
	        PrintWriter out = new PrintWriter(outputStream);
	        solver.solve(in, out);
	        //out.println("time(s): " + (1.0*(System.currentTimeMillis()-t1))/1000.0);
	        out.close();
		}
        // File IO
		else {
			String IPfilePath = System.getProperty("user.home") + "/Downloads/ip.in";
	        String OPfilePath = System.getProperty("user.home") + "/Downloads/op.out";
	        InputReader fin = new InputReader(IPfilePath);
	        PrintWriter fout = null;
	        try {
				fout = new PrintWriter(new File(OPfilePath));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
	        solver.solve(fin, fout);
	        //fout.println("time(s): " + (1.0*(System.currentTimeMillis()-t1))/1000.0);
	        fout.close();
		}
	}

	public static void main(String[] args) {
        prepareIO(false);
	}

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

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

        public InputReader(String filePath) {
        	File file = new File(filePath);
            try {
				reader = new BufferedReader(new FileReader(file));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
            tokenizer = null;
        }

        public String nextLine() {
        	String str = "";
        	try {
				str = reader.readLine();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
        	return str;
        }

        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());
        }

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

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

    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;

public class d1  extends PrintWriter {

    static BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
    // static Scanner s=new Scanner(System.in);
    d1 () { super(System.out); }
    public static void main(String[] args) throws IOException{
        d1  d1=new d1 ();d1.main();d1.flush();
    }
    void main() throws IOException {
        BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
        StringBuffer sb = new StringBuffer();
        StringBuffer sb1 = new StringBuffer();
        PrintWriter out = new PrintWriter(System.out);
          String[] s1 = s();
           int n=i(s1[0]);long x=i(s1[1]);long y=i(s1[2]);
           long[] dp=new long[2*n+1];
           Arrays.fill(dp,Long.MAX_VALUE);
           dp[0]=0;
           for(int i=1;i<=2*n;i++){
               dp[i]=Math.min(dp[i],dp[i-1]+x);
               if(i>=n){
                   dp[n]=Math.min(dp[n],dp[i]+(long)(i-n)*x);
               }else if(2*i>=n){
                   dp[n]=Math.min(dp[n],dp[i]+(long)(i-n/2)*x+y);
               }

                if(2*i<=2*n){
                    dp[2*i]=Math.min(dp[2*i],dp[i]+y);
                }
           }
        System.out.println(dp[n]);
    }
    public void sort(int[] a,int l,int h){
        if(l==h) return;
        int mid=(l+h)/2;

        sort(a,l,mid);
        sort(a,mid+1,h);
        merge(a,l,(l+h)/2,h);
    }
    void merge(int arr[], int l, int m, int r)
    {
        int n1 = m - l + 1;
        int n2 = r - m;
        int L[] = new int[n1];
        int R[] = new int[n2];
        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];
        int i = 0, j = 0;
        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++;
        }

        while (i < n1) {
            arr[k] = L[i];
            i++;
            k++;
        }
        while (j < n2) {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    static long gcd(long a, long b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    static String[] s() throws IOException {
        return s.readLine().trim().split("\\s+");
    }

    static int i(String ss) {
        return Integer.parseInt(ss);
    }
    static long l(String ss) {
        return Long.parseLong(ss);
    }
}
class Student {
    long  a;long b;int i;long val;
    public Student(long a,long b,int i,long val) {
      this.a=a;this.b=b;this.i=i;this.val=val;
    }
}
class Pair {
    int  a,b;long val;int edgeVal;int train;
    public Pair(int  a,long val,int train){
        this.a=a;this.val=val;this.train=train;}
}
class Sortbyroll implements Comparator<Student> {

    public int compare(Student a, Student b){
        if(a.a<b.a) return 1;
        else if(a.a==b.a){return 0;}
        return -1;  }
}

import java.util.Arrays;
import java.util.Scanner;

public class GenerateSt {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		N = sc.nextInt(); X = sc.nextInt(); Y = sc.nextInt();

		dp = new long[N];
		Arrays.fill(dp, -1);

		System.out.println(X + solve(1));
	}

	static int X,Y,N;

	static long dp[];

	static long solve(int i)
	{
		if(i == N)
			return 0;
		if(i > N)
			return (long) 1e17;

		if(dp[i] != -1)
			return dp[i];

		return dp[i] = Math.min(solve(i+1) + X, solve(i * 2) + Y);
	}
}

import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    static long inf = (long)1e18,x,y;
    static long [] dp;

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;

        tk = new StringTokenizer(in.readLine());
        int n = parseInt(tk.nextToken());
        x = parseLong(tk.nextToken());
        y = parseLong(tk.nextToken());

        dp = new long[n+1];
        Arrays.fill(dp, -1);

        System.out.println(calc(n));
    }

    static long calc(int n) {
        if(n==1)
            return x;

        if(dp[n]!=-1)
            return dp[n];

        long ans;
        if(n%2==0)
            ans = min(calc(n-1)+x, calc(n/2)+y);
        else ans = min(calc(n-1)+x, calc((n-1)/2)+x+y);

        return dp[n] = ans;
    }
}

import java.util.Scanner;

/**
 * Created by zqin on 2016/8/22.
 */
public class Main {

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

        while (scanner.hasNext()){
            int n  = scanner.nextInt(); int x = scanner.nextInt(); int y = scanner.nextInt();

            long [] a = new long[2*n+1];

            for(int i = 1;i <=n;i++){
                if(a[i] == 0) a[i]  = i*x;

                if(a[i] > i*x) a[i] = i*x;

                    if(a[2*i] == 0)
                        a[2*i] = a[i] + y;
                else{
                        if(a[2*i] > a[i] + y) a[2*i] = a[i] + y;
                    }
                    int t = 2*i;long last = a[2*i];
                    while(t > 0) {
                        if(a[t] == 0 || a[t] > last){

                            a[t] = last;
                    }

                        last += x;
                        t--;
                    }

                t = 2*i;last = a[2*i];
                while(t <= 2*n){
                    if(a[t] == 0 || a[t] > last){
                        a[t] = last;
                    }

                    last += x;
                    t++;
                }

            }

            System.out.println(a[n]);
        }
    }
}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class GenerateAString_Edu16 {
	static int n, x, y;

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		x = sc.nextInt();
		y = sc.nextInt();
		System.out.println(dijkstra(0, n));
	}

	static int INF = 1000000000;

	static int dp(int sum, int duplicate) {
		if (sum == n)
			return 0;
		if (sum > n)
			return INF;
		int dup = y + dp(sum * 2, 1);
		int insert = x + dp(sum + 1, 0);
		return Math.min(insert, dup);
	}

	static int dijkstra(int S, int T) {
		int dist[] = new int[n + 1];
		Arrays.fill(dist, INF);
		PriorityQueue<Pair> pq = new PriorityQueue<Pair>();
		pq.add(new Pair(S, 0));
		while (!pq.isEmpty()) {
			Pair cur = pq.remove();
			if (cur.node == T)
				return dist[cur.node];
			if (cur.wt > dist[cur.node])
				continue;

			if (cur.node + 1 <= n && cur.wt + x < dist[cur.node + 1])
				pq.add(new Pair(cur.node + 1, dist[cur.node + 1] = cur.wt + x));

			if (cur.node - 1 >= 0 && cur.node - 1 <= n && cur.wt + x < dist[cur.node - 1])
				pq.add(new Pair(cur.node - 1, dist[cur.node - 1] = cur.wt + x));

			if (cur.node * 2 <= n && cur.wt + y <= dist[cur.node * 2])
				pq.add(new Pair(cur.node * 2, dist[cur.node * 2] = cur.wt + y));
		}
		return -1;

	}

	static class Pair implements Comparable<Pair> {
		int node, wt;

		Pair(int n, int w) {
			node = n;
			wt = w;
		}

		@Override
		public int compareTo(Pair o) {
			if (wt != o.wt)
				return wt - o.wt;
			return node - o.node;
		}
	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

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

		Scanner(FileReader r) {
			br = new BufferedReader(r);

		}

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

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

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

public class Main {

	static int p = 1000000007;
	static Mod mod = new Mod();
	//static int p = 998244353;

	public static void main(String args[]) throws IOException {
		Scanner sc = new Scanner();
		PrintWriter out = new PrintWriter(System.out);

		int t = 1;
		//t = sc.nextInt();

		while (t-- > 0) {

			long n=sc.nextInt(), x=sc.nextInt(), y=sc.nextInt(), dp[]=new long[(int)n+1];
			for(int i=1; i<=n; i++) {
				if(i%2==1)
					dp[i]=dp[i-1]+x;
				else {
					dp[i]=min(dp[i-1]+x, dp[i/2]+y);
				}
			}
			out.print(dp[(int)n]);
		}
		out.flush();
	}

	static int count(int x, int[] arr) {
		int count = 0;

		for (int i = 0; i < arr.length; i++)
			if (arr[i] == x)
				count++;
		return count;
	}

	public static String reverseString(String str) {
		StringBuilder sb = new StringBuilder(str);
		sb.reverse();
		return sb.toString();
	}

	static boolean isPalindrome(String str) {
		int i = 0, j = str.length() - 1;

		while (i < j) {

			if (str.charAt(i) != str.charAt(j))
				return false;

			i++;
			j--;
		}
		return true;
	}

	static void print(int[] arr) {
		for (int i = 0; i < arr.length; i++)
			System.out.print(arr[i] + " ");
		System.out.println();
	}

	public static int abs(int x) {
		return ((x > 0) ? x : -x);
	}

	public static long abs(long x) {
		return ((x > 0) ? x : -x);
	}

	public static int max(int a, int b) {
		return Math.max(a, b);
	}

	public static long max(long a, long b) {
		return Math.max(a, b);
	}

	public static int min(int a, int b) {
		return Math.min(a, b);
	}

	public static long min(long a, long b) {
		return Math.min(a, b);
	}

	static int gcd(int a, int b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}

	static int modInverse(int a, int m) {
		int g = gcd(a, m);
		if (g != 1)
			return -1;
		else
			return power(a, m - 2, m);

	}

	// To compute x^y under modulo m
	static int power(int x, int y, int m) {
		if (y == 0)
			return 1;

		int p = power(x, y / 2, m) % m;
		p = (p * p) % m;

		if (y % 2 == 0)
			return p;
		else
			return (x * p) % m;
	}

	static int[] primeGenerator(int num) {
		int length = 0, arr[] = new int[num], a = num, factor = 1;
		if (num % 2 == 0) {
			while (num % 2 == 0) {
				num /= 2;
				factor *= 2;
			}
			arr[length++] = factor;
		}
		for (int i = 3; i * i <= a; i++) {
			factor = 1;
			if (num % i == 0) {
				while (num % i == 0) {
					num /= i;
					factor *= i;
				}
				arr[length++] = factor;
			}
		}
		if (num > 1)
			arr[length++] = num;
		return Arrays.copyOfRange(arr, 0, length);
	}

	static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;

		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;

		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;

		return true;
	}

	  static class Scanner { BufferedReader br; StringTokenizer st;

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

	  Scanner(String fileName) throws FileNotFoundException { br = new
	  BufferedReader(new FileReader(fileName)); }

	  String next() 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(next()); }

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

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

	  boolean ready() throws IOException { return br.ready(); }

	  }

	static void sort(int[] a) {
		shuffle(a);
		Arrays.sort(a);
	}

	static void shuffle(int[] a) {
		int n = a.length;
		Random rand = new Random();
		for (int i = 0; i < n; i++) {
			int tmpIdx = rand.nextInt(n);
			int tmp = a[i];
			a[i] = a[tmpIdx];
			a[tmpIdx] = tmp;
		}
	}
}

class Pair {
	int x;
	int y;

	Pair(int a, int b) {
		x = a;
		y = b;
	}

	void print() {
		System.out.println(this.x + " " + this.y);
	}
}

class Mod{
	static final int MOD = 998244353;

	int add(int x, int y){
		x += y;
	    while(x >= MOD) x -= MOD;
	    while(x < 0) x += MOD;
	    return x;
	}

	int subtract(int x, int y) {
		x -= y;
	    while(x >= MOD) x -= MOD;
	    while(x < 0) x += MOD;
	    return x;
	}

	int mul(int x, int y)
	{
		int result = (int)((long)x*y % MOD);
	    return result>=0?result:result+MOD;
	}

	int binpow(int x, int y)
	{
	    int z = 1;
	    while(y!=0)
	    {
	        if((y & 1)!=0)
	        	z = mul(z, x);
	        x = mul(x, x);
	        y >>= 1;
	    }
	    return z;
	}

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

	int divide(int x, int y)
	{
	    return mul(x, inv(y));
	}

	static final int N =200043;
	int[] fact;

	Mod() {
		fact = new int[N];
	}

	void precalc()
	{
	    fact[0] = 1;
	    for(int i = 1; i < N; i++)
	        fact[i] = mul(fact[i - 1], i);
	}

	int C(int n, int k)
	{
	    return divide(fact[n], mul(fact[k], fact[n - k]));
	}
}

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

public class generateString
{
	static int n;
	static long x;
	static long y;
	static long []dp;

	static long rec(int size)
	{

		if (size == n)
			return 0;

		if (dp[size] != -1)
			return dp[size];

		long res = Long.MAX_VALUE;

		if (2*size <= n && size*2 > 0)
			res = Math.min(res, y+rec(size*2));
		if (2*size > n)
			res = Math.min(res, y+x*(2*size-n-1));

		if (size + 1 <= n)
			res = Math.min(res, x+rec(size+1));

		return dp[size] = res;
	}

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

		n = sc.nextInt();
		x = sc.nextLong();
		y = sc.nextLong();

		dp = new long [n+1];
		Arrays.fill(dp,-1);

		out.println(x+rec(1));
		out.close();

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class ETask {

    static long[] graph;
    static boolean visited[];

    public static void main(String[] args) throws IOException {
        MyInputReader in = new MyInputReader(System.in);
        long n = in.nextInt();
        long x = in.nextInt();
        long y = in.nextInt();
        graph = new long[20000000];
        for (int i = 0; i < 20000000; i++) {
            graph[i] = Integer.MAX_VALUE;
        }
        visited = new boolean[20000000];
        TreeSet<Integer> pq = new TreeSet<Integer>(new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                int a = o1;
                int b = o2;
                if (a == b) {
                    return Long.compare(graph[a], graph[b]);
                } else {
                    int c = Long.compare(graph[a], graph[b]);
                    if (c != 0) {
                        return c;
                    } else {
                        return Long.compare(a, b);
                    }
                }

            }
        });
        pq.add(0);
        graph[0] = 0;
        while (!pq.isEmpty()) {
            int cur = pq.pollFirst();
            visited[cur] = true;
            if (cur == n) {
                System.out.println(graph[cur]);
                return;
            }
            if (cur - 1 >= 0 && !visited[cur - 1]) {
                pq.remove(cur - 1);
                graph[cur - 1] = Math.min(graph[cur - 1], graph[cur] + x);
                pq.add(cur - 1);
            }
            if (cur + 1 < 20000000 && !visited[cur + 1]) {
                pq.remove(cur + 1);
                graph[cur + 1] = Math.min(graph[cur + 1], graph[cur] + x);
                pq.add(cur + 1);
            }
            if (cur * 2 < 20000000 && !visited[cur * 2]) {
                pq.remove(cur * 2);
                graph[cur * 2] = Math.min(graph[cur * 2], graph[cur] + y);
                pq.add(cur * 2);
            }
        }
    }

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

        public MyInputReader(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 int nextInt() {
            return Integer.parseInt(next());
        }

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

    }

}

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

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

    private void solve() {
        Scanner scanner = new Scanner(System.in);
        PrintWriter writer = new PrintWriter(System.out);

        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        scanner.close();
        int[] d = new int[n + 1];

        d[1] = x;
        for (int i = 2; i <= n; i++) {
            d[i] = Math.min(d[i - 1] + x, d[(i + 1) / 2] + y + x * (i % 2));
        }
        writer.print(d[n]);
        writer.close();
    }
}

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

public class TaskE{
  public static void main(String[] args) {
    TaskE tE = new TaskE();
    PrintWriter pw = new PrintWriter(System.out);
    tE.solve(new Scanner(System.in), pw);
    pw.close();
  }

  public void solve(Scanner input, PrintWriter output) {
    int n = input.nextInt();
    int x = input.nextInt();
    int y = input.nextInt();

    int[] f = new int[n * 2 + 1];
    f[1] = x;
    for (int i = 2; i <= 2 * n; i++) {
      f[i] = f[i - 1] + x;
      if (i % 2 == 0) {
        f[i] = Math.min(f[i], f[i / 2] + y);
      }
    }

    for (int i = 2 * n - 1; i > 1; i--) {
      f[i] = Math.min(f[i], f[i + 1] + x);
    }
    output.println(f[n]);
  }
}

import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    static long inf = (long)1e18,x,y;
    static long [] dp;

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;

        tk = new StringTokenizer(in.readLine());
        int n = parseInt(tk.nextToken());
        x = parseLong(tk.nextToken());
        y = parseLong(tk.nextToken());

        dp = new long[n+1];
        Arrays.fill(dp, -1);

        System.out.println(calc(n));
    }

    static long calc(int n) {
        if(n==1)
            return x;

        if(dp[n]!=-1)
            return dp[n];

        long ans = calc(n-1)+min(x, y+x*(n-1));
        if(n%2==0)
            ans = min(ans, calc(n/2)+y);
        else ans = min(ans, calc((n-1)/2)+x+y);

        return dp[n] = ans;
    }
}

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

public class E {
	InputStream is;

	int __t__ = 1;
	int __f__ = 0;
	int __FILE_DEBUG_FLAG__ = __f__;
	String __DEBUG_FILE_NAME__ = "src/T";

	FastScanner in;
	PrintWriter out;

	public void solve() {
		int n = in.nextInt(), x = in.nextInt(), y = in.nextInt();

		long[] dp = new long[2*n+1];
		Arrays.fill(dp, (1L << 60));
		dp[1] = x;
		int up = 1;

		while (up < n) {
			for (int i = up + 1; i <= 2 * up; i++) {
				dp[i] = Math.min(dp[i], dp[i-1] + x);
			}
			for (int i = 2 * up - 1; i >= up + 1; i--) {
				dp[i] = Math.min(dp[i], dp[i+1] + x);
			}
			for (int i = up + 1; i <= 2 * up; i++) {
				if (i % 2 == 0)
					dp[i] = Math.min(dp[i], dp[i/2] + y);
			}
			for (int i = 2 * up - 1; i >= up + 1; i--) {
				dp[i] = Math.min(dp[i], dp[i+1] + x);
			}
			up *= 2;
		}
		System.out.println(dp[n]);
	}

	public void run() {
		if (__FILE_DEBUG_FLAG__ == __t__) {
			try {
				is = new FileInputStream(__DEBUG_FILE_NAME__);
			} catch (FileNotFoundException e) {
				// TODO 自動生成された catch ブロック
				e.printStackTrace();
			}
			System.out.println("FILE_INPUT!");
		} else {
			is = System.in;
		}
		in = new FastScanner(is);
		out = new PrintWriter(System.out);

		solve();
	}

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

	public void mapDebug(int[][] a) {
		System.out.println("--------map display---------");

		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				System.out.printf("%3d ", a[i][j]);
			}
			System.out.println();
		}

		System.out.println("----------------------------");
		System.out.println();
	}

	public void debug(Object... obj) {
		System.out.println(Arrays.deepToString(obj));
	}

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

		public FastScanner(InputStream stream) {
			this.stream = stream;
			//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[] nextIntArray(int n) {
			return nextIntArray(n, 0);
		}

		int[] nextIntArray(int n, int margin) {
			int[] array = new int[n + margin];
			for (int i = 0; i < n; i++)
				array[i + margin] = nextInt();

			return array;
		}

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

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

		long[] nextLongArray(int n) {
			return nextLongArray(n, 0);
		}

		long[] nextLongArray(int n, int margin) {
			long[] array = new long[n + margin];
			for (int i = 0; i < n; i++)
				array[i + margin] = nextLong();

			return array;
		}

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

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

		double[] nextDoubleArray(int n) {
			return nextDoubleArray(n, 0);
		}

		double[] nextDoubleArray(int n, int margin) {
			double[] array = new double[n + margin];
			for (int i = 0; i < n; i++)
				array[i + margin] = nextDouble();

			return array;
		}

		double[][] nextDoubleMap(int n, int m) {
			double[][] map = new double[n][m];
			for (int i = 0; i < n; i++) {
				map[i] = in.nextDoubleArray(m);
			}
			return map;
		}

		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[] nextStringArray(int n) {
			String[] array = new String[n];
			for (int i = 0; i < n; i++)
				array[i] = next();

			return array;
		}

		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();
		}
	}
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int insertWeight = input.nextInt();
        int doubleWeight = input.nextInt();

        int ans[] = new int[n + 1];
        ans[0] = 0;
        ans[1] = insertWeight;
        for (int i = 2; i < n+1; i++) {
            if (i % 2 == 1) {
                ans[i] = Math.min(ans[(i - 1)] + insertWeight, ans[(i + 1) / 2] + insertWeight + Math.min(doubleWeight,insertWeight * (i + 1) / 2));
            } else {
                ans[i] = Math.min(ans[i / 2] + doubleWeight, ans[i / 2] + insertWeight * i / 2);

            }
        }

        System.out.print(ans[n]);
    }
}

import java.util.Scanner;

/**
 * Created by zqin on 2016/8/22.
 */
public class Main {

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

        while (scanner.hasNext()){
            int n  = scanner.nextInt(); int x = scanner.nextInt(); int y = scanner.nextInt();

            long [] a = new long[2*n+1];

            for(int i = 1;i <=n;i++){
                if(a[i] == 0) a[i]  = i*x;

                if(a[i] > i*x) a[i] = i*x;

                    if(a[2*i] == 0) a[2*i] = a[i] + y;
                    int t = 2*i;long last = a[i] + y;
                    while(t > 0) {
                        if(a[t] == 0 || a[t] > last){

                            a[t] = last;
                    }

                        last += x;
                        t--;
                    }

                t = 2*i;last = a[i]+y;
                while(t <= 2*n){
                    if(a[t] == 0 || a[t] > last){
                        a[t] = last;
                    }

                    last += x;
                    t++;
                }

            }

            System.out.println(a[n]);
        }
    }
}

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

public class Main {
    public static void main(String[] args) throws IOException{
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        Sol sol = new Sol(N, X, Y);
        sol.solve();
    }
}

class Sol {
    int[] ar;
    int N, X, Y, res;

    Sol(int N, int X, int Y){
        this.N = N;
        this.X = X;
        this.Y = Y;
        ar = new int[N+1];
    }

    void rec(int x, int sf){
        if(x == 0){
            res = sf;
            return;
        }

        if((x&1)==1){
            rec(x-1, sf+X);
        }
        else {
            int min = (x>>1)*X;
            min = (Y < min ? Y : min);
            rec(x>>1, sf+min);
        }
    }

    void solve(){
        rec(N, 0);
        System.out.println(res);
    }
}

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

public class Main {

    public static long find(int n, int x, int y, int len, long[] dp){
        if(len == n) return 0;
        else if(len > n) return (long)(1e16);
        else if(dp[len]!=-1) return dp[len];
        long op1 = find(n, x, y, len+1, dp) + x;
        long op2 = find(n, x, y, 2*len, dp) + y;
        dp[len] = Math.min(op1, op2);
        return Math.min(op1, op2);
    }

    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int x = Integer.parseInt(st.nextToken());
        int y = Integer.parseInt(st.nextToken());
        long[] dp = new long[n+1];
        Arrays.fill(dp, -1);
        long ans = find(n, x, y, 1, dp);
        System.out.println(ans+x);
    }
}

//package com.codeforces.competitions.educational.year2016.round16;

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

public final class TaskE
{
    public static void main(String[] args)
    {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);

		Solver solver = new Solver(in, out);
		solver.solve();

        out.flush();

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

    static class Solver
    {
		static final long INFINITY = Long.MAX_VALUE;
        int n;
		long x, y;
		long[] dp;
        InputReader in;
        OutputWriter out;

		void solve()
		{
			n = in.nextInt();
			x = in.nextInt();
			y = in.nextInt();
			dp = new long[n + 1];

			Arrays.fill(dp, INFINITY);

			out.println(find(1) + x);
		}

		long find(int created)
		{
			if (created > n)
				return (created - n) * x;

			if (dp[created] != INFINITY)
				return dp[created];

			if (created == n)
				return 0;

//			System.out.println("created : " + created);

			long min = INFINITY;

/*			if (created == n / 2)
			{
				// either double it, or add n / 2 a's
				min = Math.min(min, y);
				min = Math.min(min, (n / 2) * x);
			}
			else */if (created > n / 2)
			{
				// either subtract and bring count to n / 2 and then double it, or increase count one-by-one to n
				min = Math.min(min, (created - n / 2) * x + y);
				min = Math.min(min, (n - created) * x);
			}
			else
			{
				// either increase count by 1, or double it.
				min = Math.min(min, find(created + 1) + x);
				min = Math.min(min, find(created << 1) + y);
			}

/*			if (created > 2)
				min = Math.min(min, find((created - 1) << 1) + x + y);*/

			dp[created] = min;

			return min;
		}

        public Solver(InputReader in, OutputWriter 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() // problematic
        {
            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() // not completely accurate
        {
            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();
            }
        }

    }

    static class OutputWriter
    {
        private PrintWriter writer;

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

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

        public void println(int x)
        {
            writer.println(x);
        }

        public void print(int x)
        {
            writer.print(x);
        }

		public void println(char x)
		{
			writer.println(x);
		}

		public void print(char x)
		{
			writer.print(x);
		}

        public void println(int array[], int size)
        {
            for (int i = 0; i < size; i++)
                println(array[i]);
        }

        public void print(int array[], int size)
        {
            for (int i = 0; i < size; i++)
                print(array[i] + " ");
        }

        public void println(long x)
        {
            writer.println(x);
        }

        public void print(long x)
        {
            writer.print(x);
        }

        public void println(long array[], int size)
        {
            for (int i = 0; i < size; i++)
                println(array[i]);
        }

        public void print(long array[], int size)
        {
            for (int i = 0; i < size; i++)
                print(array[i]);
        }

        public void println(float num)
        {
            writer.println(num);
        }

        public void print(float num)
        {
            writer.print(num);
        }

        public void println(double num)
        {
            writer.println(num);
        }

        public void print(double num)
        {
            writer.print(num);
        }

        public void println(String s)
        {
            writer.println(s);
        }

        public void print(String s)
        {
            writer.print(s);
        }

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

        public void printSpace()
        {
            writer.print(" ");
        }

		public void printf(String format, Object args)
		{
			writer.printf(format, args);
		}

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

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

    }

}

/* package codechef; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int x = in.nextInt();
		int y = in.nextInt();

		if( x < y) System.out.println(n*x);
		else {
		    int i = 0;
		    int ans = 0;
		    while(i == 0 || n % i != 0) {
		        i++;
		        ans += x;
		    }

		    while(i != n) {
		        i*= 2;
		        ans += y;
		    }

		    System.out.println(ans);

		}
	}
}

/* package codechef; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{

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

		int n = in.nextInt();
		int x = in.nextInt();
		int y = in.nextInt();

		int[] dp = new int[n+1];
		dp[1] = x;

		for(int i = 1; i < n; i++) {

		    if(dp[i] == 0) continue;
		    if(dp[i+1] == 0) {
		        dp[i+1] = dp[i] + x;
		    }else {
		        dp[i+1] = Math.min(dp[i+1], dp[i]  + x);
		    }

		    if(i >= 2 && i*2 - 1 <= n) {
		        if(dp[2*i - 1] == 0) dp[2*i - 1] = dp[i]+x+y;
		        else {
		             dp[i*2 -1 ] = Math.min(dp[i*2 -1] , dp[i] + x+y);;
		        }
		    }

		    if(i*2 <= n)  {
    		    if(dp[2*i] == 0) dp[2*i] = dp[i] + y;
    		    else {
    		        dp[2*i] = Math.min(dp[i] + y, dp[2*i]);
    		    }
		    }

		}

		System.out.println(dp[n]);
	}

}

import java.util.Scanner;
public class Generetor {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int x=sc.nextInt();
        int y=sc.nextInt();
        long k=0;
        while (n>0) {
            if (n%2==0)if (n/2>y/x) {n/=2; k+=y;} else {k+=n*x; n=0;} else if((n+1)%4==0&&(n-1)%4>0){n+=1; k+=x;} else {n-=1; k+=x;}
        }
        System.out.print(k);
    }
}

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

public class E {
	InputStream is;

	int __t__ = 1;
	int __f__ = 0;
	int __FILE_DEBUG_FLAG__ = __f__;
	String __DEBUG_FILE_NAME__ = "src/T";

	FastScanner in;
	PrintWriter out;

	public void solve() {
		int n = in.nextInt(), x = in.nextInt(), y = in.nextInt();

		long[] dp = new long[2*n+1];
		Arrays.fill(dp, (1L << 60));
		dp[1] = 1;
		int up = 1;

		while (up < n) {
			for (int i = up + 1; i <= 2 * up; i++) {
				dp[i] = Math.min(dp[i], dp[i-1] + x);
			}
			for (int i = 2 * up - 1; i >= up + 1; i--) {
				dp[i] = Math.min(dp[i], dp[i+1] + x);
			}
			for (int i = up + 1; i <= 2 * up; i++) {
				dp[i] = Math.min(dp[i], dp[i/2] + y);
			}
			up *= 2;
		}
		System.out.println(dp[n]);
	}

	public void run() {
		if (__FILE_DEBUG_FLAG__ == __t__) {
			try {
				is = new FileInputStream(__DEBUG_FILE_NAME__);
			} catch (FileNotFoundException e) {
				// TODO 自動生成された catch ブロック
				e.printStackTrace();
			}
			System.out.println("FILE_INPUT!");
		} else {
			is = System.in;
		}
		in = new FastScanner(is);
		out = new PrintWriter(System.out);

		solve();
	}

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

	public void mapDebug(int[][] a) {
		System.out.println("--------map display---------");

		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				System.out.printf("%3d ", a[i][j]);
			}
			System.out.println();
		}

		System.out.println("----------------------------");
		System.out.println();
	}

	public void debug(Object... obj) {
		System.out.println(Arrays.deepToString(obj));
	}

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

		public FastScanner(InputStream stream) {
			this.stream = stream;
			//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[] nextIntArray(int n) {
			return nextIntArray(n, 0);
		}

		int[] nextIntArray(int n, int margin) {
			int[] array = new int[n + margin];
			for (int i = 0; i < n; i++)
				array[i + margin] = nextInt();

			return array;
		}

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

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

		long[] nextLongArray(int n) {
			return nextLongArray(n, 0);
		}

		long[] nextLongArray(int n, int margin) {
			long[] array = new long[n + margin];
			for (int i = 0; i < n; i++)
				array[i + margin] = nextLong();

			return array;
		}

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

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

		double[] nextDoubleArray(int n) {
			return nextDoubleArray(n, 0);
		}

		double[] nextDoubleArray(int n, int margin) {
			double[] array = new double[n + margin];
			for (int i = 0; i < n; i++)
				array[i + margin] = nextDouble();

			return array;
		}

		double[][] nextDoubleMap(int n, int m) {
			double[][] map = new double[n][m];
			for (int i = 0; i < n; i++) {
				map[i] = in.nextDoubleArray(m);
			}
			return map;
		}

		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[] nextStringArray(int n) {
			String[] array = new String[n];
			for (int i = 0; i < n; i++)
				array[i] = next();

			return array;
		}

		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();
		}
	}
}

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class CodeForcdes{

	private static int[] dp;

	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		dp = new int[n];
		for(int i = 0 ; i < n  ; i ++){
			dp[i] = -1;
		}
		System.out.println(getMinimumTime(y, x, 1, n)+x);
	}

	private static int getMinimumTime(int costCopy,int costInDel,int curLenght,int n){
		//System.out.println(curLenght);

		if(curLenght >= n){
			return 0;
		}

		if(dp[curLenght] != -1) return dp[curLenght];
		int fs = getMinimumTime(costCopy, costInDel, curLenght*2, n)+costCopy;
		if(fs == -1) fs= Integer.MAX_VALUE;
		int ss = getMinimumTime(costCopy, costInDel, curLenght+1, n)+costInDel;
		if(ss == -1) ss= Integer.MAX_VALUE;
		return dp[curLenght] = Math.min(fs,ss);

	}

}

import java.util.Scanner;
public class Generator {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int x=sc.nextInt();
        int y=sc.nextInt();
        long t[]=new long[n+1];
        t[1]=1;
        for (int i = 2; i <= n; i++) {
            t[i]=Math.min(t[i-1]+x, t[(i+1)/2]+y+(i%2)*x);
        }
        System.out.print(t[n]);
    }
}

// CodeForces Educational Round 16 -- slowe

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

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

		int n = in.nextInt(), x = in.nextInt(), y = in.nextInt();
		long[] time = new long[n+1];
		time[1] = x;
		for(int i = 1; i <= n; i++)
			time[i] = Math.min(time[i-1] + x, time[(i+1)/2] + y + (i%2)+x);
		pw.println(time[n]);

		pw.flush();
		pw.close();
	}

	// if last move was add, subtract is pointless
	// if last move was double, subtraction may be helpful
	// if last move was subtract, previous move must have been double,
	//   so another subtraction yields foo-d-s-s for 2*foo-2
	//   which is equal to 2*(foo-1) from foo-s-d
	//   however, the latter is cheaper, so never subtract twice
	// thus only subtract after doubling

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

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

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

import java.io.*;
import java.math.*;
import java.security.KeyStore.Entry;
import java.util.*;

public class TestClass {
	private InputStream is;
	private PrintWriter pw;

	private void soln() {
		int n = ni();
		long x = ni(),y = ni();
		long arr[] = new long[(int)n+1];
		arr[0] = (long)1e15;
		for(int i=n-1;i>=0;i--){
			arr[i] = Math.min(arr[i+1]+x,y+(2*i<=n?arr[2*i]:(long)1e15));
			arr[i+1] = Math.min(arr[i+1], arr[i]+x);
		}
		pw.println(arr[0]);
	}

	void run() throws Exception {
		is = System.in;
		pw = new PrintWriter(System.out);
		long s = System.currentTimeMillis();
		soln();
		pw.flush();
		tr(System.currentTimeMillis() - s + "ms");
	}

	public static void main(String[] args) throws Exception {
		new Thread(null, new Runnable() {
			public void run() {
				try {
					new TestClass().run();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}, "1", 1 << 26).start();
	}

	// 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.math.*;
import java.security.KeyStore.Entry;
import java.util.*;
/*
                                                                yash jobanputra
                                                                    DA-IICT
*/
public class yash {
    private static InputStream stream;
    private static byte[] buf = new byte[1024];
    private static int curChar;
    private static int numChars;
    private static SpaceCharFilter filter;
    private static PrintWriter pw;
    private static long mod = 1000000000 + 7;
    private static long mod1 = 1000000000 + 9;
    private static int MAX=1000001;
    private static int block;
    private static int[] par;
    private static long[] cost;
    private static long[] costm;
    private static int times;
    private static long ans;
    private static int max=51;
    private static boolean[] vis;
    private static boolean[] vis2;
    private static boolean[] vis3;
    private static long[] sa;
    private static long count;
    private static boolean ff;
    private static ArrayList<Integer>[] ggc;
    private static long[] arra;
    private static long[] a;
    private static int[] sp;
    private static int[] dp;
    private static int x;
    //private static long[] dist;
    public static void soln()
    {
    	int n=ni();int x=ni();int y=ni();dp=new int[10000000+5];
    	dp[1]=x;
    	for(int i=2;i<=n;i++)
    	{
    		if(i%2==0)
    			dp[i]=Math.min(dp[i/2]+y,dp[i-1]+x);
    		else
    			dp[i]=dp[i-1]+x;
    	}
    	pw.println(dp[n]);
    }
    public static void dfs(ArrayList<Pair>[] gr,int v)
    {
        vis[v]=true;
        ArrayList<Pair> arr=gr[v];
        for(int i=0;i<arr.size();i++)
        {
            if(!vis[arr.get(i).v])
            {
           		dfs(gr,arr.get(i).v);
           	}
        }
    }
    public static class lca{
    	int[] e;
    	int[] l;
    	int[] h;
    	int[] level;
    	boolean[] vis;
    	int time;
    	int[] tree=new int[10000000];
        int[] lazy=new int[10000000];
        int n;
    	public lca(ArrayList<Integer>[] g)
    	{
    		n=g.length-1;
    		pw.println(n);
    		e=new int[2*n];
    		l=new int[2*n];
    		h=new int[n+1];
    		vis=new boolean[n+1];
    		level=new int[n+1];
    		level[1]=0;
    		dfs(g,1);
    		Arrays.fill(lazy, 0);
    		build(l,0,0,2*n-1);
    	}
    	public int lf(int u,int v)
    	{
    		int a=h[u];int b=h[v];
    		if(h[u]>h[v])
    			{a=h[v];b=h[u];}
    		int p=query(l,0,0,2*n-1,a,b);
    		return e[p];
    	}
    	public void dfs(ArrayList<Integer>[] gr,int v)
        {
             vis[v]=true;
             time++;
             e[time]=v;
             l[time]=level[v];
             h[v]=time;
             ArrayList<Integer> arr=gr[v];
             for(int i=0;i<arr.size();i++)
             {
                 if(!vis[arr.get(i)])
                 {
                	 level[arr.get(i)]=level[v]+1;
                	 dfs(gr,arr.get(i));
                	 time++;e[time]=v;l[time]=level[v];
                 }
             }
         }
    	 public void build(int[] arr,int node,int l,int r)
         {
             if(l==r)
             {
                 tree[node]=l;
             }
             else
             {
                 int m=(l+r)/2;
                 build(arr,(2*node)+1,l,m);
                 build(arr,(2*node)+2,m+1,r);
                 if(arr[tree[2*node+1]]<arr[tree[2*node+2]])
                	 tree[node]=tree[2*node+1];
                 else
                	 tree[node]=tree[2*node+2];
             }
         }
    	 public int query(int[] arr,int node,int l,int r,int s,int e)
         {
             if(e<l || r<s)
                 return -1;
             if(s<=l && e>=r)
                 return tree[node];
             int m=(l+r)/2;
             int p1=query(arr,(2*node+1),l,m,s,e);
             int p2=query(arr,(2*node+2),m+1,r,s,e);
             if(p1==-1)
            	 return p2;
             else if(p2==-1)
            	 return p1;
             else
             {
            	 if(arr[p1]<arr[p2])
            		 return p1;
            	 else
            		 return p2;
             }
         }
    }
    public static long[] reverse(long[] arr, int l, int r)
      {
          int d = (r-l+1)/2;
          for(int i=0;i<d;i++)
          {
             long t = arr[l+i];
             arr[l+i] = arr[r-i];
             arr[r-i] = t;
          }
          return arr;
      }
    private static class graph{
        public static void arti(boolean[] ap,int[] parent,int[] disc,int[] low,ArrayList<Integer>[] gr,boolean[] vis,int ver)
        {
            int child=0;
            vis[ver]=true;
            ArrayList<Integer> arr=gr[ver];
            times++;
            disc[ver]=low[ver]=times;
            for(int i=0;i<arr.size();i++)
            {
                if(!vis[arr.get(i)])
                {
                    child++;
                    parent[arr.get(i)]=ver;
                    arti(ap,parent,disc,low,gr,vis,arr.get(i));
                    low[ver]=Math.min(low[ver], low[arr.get(i)]);
                    if(parent[ver]!=0 && low[arr.get(i)]>=disc[ver])
                        ap[ver]=true;
                    if(parent[ver]==0 && child>1)
                        ap[ver]=true;
                }
                else if(parent[ver]!=arr.get(i))
                    low[ver]=Math.min(low[ver], disc[arr.get(i)]);
            }
        }
        public static void floyd(Pair[] arr,int n,int m,int[][] dist)
        {
            for(int i=0;i<=n;i++)
            {
                Arrays.fill(dist[i], Integer.MAX_VALUE);
            }
            for(int c=0;c<m;c++)
            {
                int w=arr[c].v;
                int a=arr[c].j.v;
                int b=arr[c].j.i;
                dist[a][b]=w;
            }
            for(int i=0;i<=n;i++)
                dist[i][i]=0;
            for(int k=1;k<=n;k++)
            {
                for(int i=1;i<=n;i++)
                {
                    for(int j=1;j<=n;j++)
                    {
                        if(dist[i][k]!=Integer.MAX_VALUE && dist[k][j]!=Integer.MAX_VALUE)
                        dist[i][j]=Math.min(dist[i][j], dist[i][k]+dist[k][j]);
                    }
                }
            }
        }
        public static boolean bfs(ArrayList<Integer>[] gr,int v,int n)
        {

            boolean[] vis=new boolean[n+1];
            int c2=0;
            Queue<Integer> q=new LinkedList<>();
            q.add(v);
            while(!q.isEmpty())
            {
                int x=q.poll();
                Iterator<Integer> it=gr[x].iterator();
                while(it.hasNext())
                {
                    int p=it.next();
                    if(!vis[p])
                    {
                        q.add(p);
                        c2++;
                        vis[p]=true;
                    }
                }
            }
            return c2==n;
        }
        public static ArrayList<Pair> MSTP(int n,int m,ArrayList<Pair>[] arr,int[][] arr2)
        {
            ArrayList<Pair> pp=new ArrayList<>();
            int[] par=new int[n+1];
            int[] key=new int[n+1];
            vis=new boolean[n+1];
            Arrays.fill(key, Integer.MAX_VALUE);
            key[1]=0;
            PriorityQueue<Integer> dis=new PriorityQueue<>(n+1,
                    new Comparator<Integer>()
                    {
                        public int compare(Integer p,Integer q)
                        {
                        return key[p]-key[q];
                        }
                    }
                    );
            dis.add(1);
            vis[1]=true;
            while(!dis.isEmpty())
            {
                //pw.println(dis);
                int u=dis.poll();
                    ArrayList<Pair> p=arr[u];
                    for(int i=0;i<p.size();i++)
                    {
                        if(key[u]+p.get(i).i<key[p.get(i).v])
                        {
                            key[p.get(i).v]=key[u]+p.get(i).i;
                            par[p.get(i).v]=u;
                            if(!vis[p.get(i).v])
                            {
                                dis.add(p.get(i).v);
                                vis[p.get(i).v]=true;
                            }
                        }
                    }
            }
            for(int i=1;i<=n;i++)
                pp.add(new Pair(i,par[i]));
            return pp;
        }
        public static ArrayList<Pair> MSTK(int n,int m,Pair[] arr)
        {
            ArrayList<Pair> pp=new ArrayList<>();
            long sum=0;
            Arrays.sort(arr);
            DSU x=new DSU(n+1);
            for(int c=0;(c<m);c++)
            {
                Pair p=arr[c];
                //int a=p.v;
                //int b=p.i;
                int a=p.j.v;
                int b=p.j.i;
                int w=p.v;
                if(x.find(a)!=x.find(b))
                {
                    pp.add(new Pair(w,new Pair(a,b)));
                    x.Union(a, b);
                }
            }
            return pp;
        }
        public static int[] dijkstras(ArrayList<Pair>[] gr)
        {
            int n=gr.length-1;
            int[] dist=new int[n+1];
            Arrays.fill(dist, Integer.MAX_VALUE);

            PriorityQueue<Integer> dis=new PriorityQueue<>(n+1,
                    new Comparator<Integer>()
                    {
                        public int compare(Integer p,Integer q)
                        {
                        return dist[p]-dist[q];
                        }
                    }
                    );
            boolean[] vis=new boolean[n+1];
            Arrays.fill(vis, false);

            int s=1;
            dist[s]=0;
            dis.add(s);
            vis[s]=true;
            while(!dis.isEmpty())
            {
                int p=dis.poll();
                for(int i=0;i<gr[p].size();i++)
                {
                    int y=gr[p].get(i).v;
                    int w=gr[p].get(i).i;
                    if(!vis[y])
                    {
                        dist[y]=dist[p]+w;
                        dis.add(y);
                        vis[y]=true;
                    }
                    else
                    {
                        if(dist[p]+w<dist[y])
                        {
                            dist[y]=dist[p]+w;
                        }
                    }
                }
            }
            return dist;
        }
    }

    public static class sieve{
        public static ArrayList<Integer> sieves(int n)
        {
            ArrayList<Integer> arr=new ArrayList<>();
            boolean[] bol=new boolean[n+1];
            Arrays.fill(bol, true);
            //arr.add(1);
            for(int i=2;i<=n;i++)
            {
                if(bol[i])
                {
                    arr.add(i);
                    for(int j=2;j*i<=n;j++)
                    {
                        bol[i*j]=false;
                    }
                }
            }
            return arr;
        }
    }
    public static class isprime{
        public static boolean check(int n)
        {
            if(n==2)
                return true;
            else if(n==3)
                return true;
            else if(n%2==0)
                return false;
            else if(n%3==0)
                return false;
            else
            {
                for(int i=6;;i+=6)
                {
                    if(i>Math.sqrt(n))
                        break;
                    if(n%(i-1)==0)
                    {
                        return false;
                    }
                    else if(n%(i+1)==0)
                        return false;
                                    }
                return true;
            }
        }
    }
    private static class DSU{
        int[] parent;
        int[] rank;
        int cnt;
        public DSU(int n){
            parent=new int[n];
            rank=new int[n];
            for(int i=0;i<n;i++){
                parent[i]=i;
                rank[i]=1;
            }
            cnt=n;
        }
        int find(int i){
            while(parent[i] !=i){
                parent[i]=parent[parent[i]];
                i=parent[i];
            }
            return i;
        }
        int Union(int x, int y){
            int xset = find(x);
            int yset = find(y);
            if(xset!=yset)
                cnt--;
            if(rank[xset]<rank[yset]){
                parent[xset] = yset;
                rank[yset]+=rank[xset];
                rank[xset]=0;
                return yset;
            }else{
                parent[yset]=xset;
                rank[xset]+=rank[yset];
                rank[yset]=0;
                return xset;
            }
        }
    }
    private static class Pair implements Comparable<Pair>{
        int v,i;Pair j;
        public Pair(int a,int b){
            v=a;
            i=b;
        }
        public Pair(int a,Pair b)
        {
            v=a;
            j=b;
        }
        @Override
        public int compareTo(Pair arg0) {
            {
                return this.v-arg0.v;
            }
        }
    }
    private static class Pairl implements Comparable<Pairl>{
        long v,i;Pairl j;
        public Pairl(long a,long b){
            v=a;
            i=b;
        }
        public Pairl(long a,Pairl b)
        {
            v=a;
            j=b;
        }
        @Override
        public int compareTo(Pairl arg0) {
            {
                if(this.v>arg0.v)
                    return 1;
                else
                    return -1;
            }
        }
    }
    public static long f(long number,long m) {
          if (number <= 1) return 1;
          else return (number * f(number - 1,m))%m;
       }
    public static long mmi(long a, long m)
    {
        long m0 = m;
        long y = 0, x = 1;

        if (m == 1)
          return 0;

        while (a > 1)
        {
            // q is quotient
            long q = a / m;
            long t = m;

            // m is remainder now, process same as
            // Euclid's algo
            m = a % m; a = t;
            t = y;

            // Update y and x
            y = x - q * y;
            x = t;
        }

        // Make x positive
        if (x < 0)
           x += m0;

        return x;
    }
    public static class segtree{
        static int[] tree=new int[10000000];
        static int[] lazy=new int[10000000];
        public static void initial()
        {
            Arrays.fill(lazy, 0);
        }
        public static void build(int[] arr,int node,int l,int r)
        {
            if(l==r)
            {
                tree[node]=arr[l];
            }
            else
            {
                int m=(l+r)/2;
                build(arr,(2*node)+1,l,m);
                build(arr,(2*node)+2,m+1,r);
                tree[node]=tree[2*node+1]+tree[(2*node)+2];
            }
        }
        public static void updater(int[] arr,int node,int l,int r,int s,int e,int val)
        {
            if(lazy[node]!=0)
            {
                tree[node]+=(r-l+1)*lazy[node];
                if(l!=r)
                {
                    lazy[2*node+1]+=lazy[node];
                    lazy[2*node+2]+=lazy[node];
                }
                lazy[node]=0;
            }
            if(s<=l && e>=r)
            {
                tree[node]+=(r-l+1)*val;
                if(l!=r)
                {
                    lazy[2*node+1]+=val;
                    lazy[2*node+2]+=val;
                }
            }
            else if(!(e<l || r<s))
            {
                int m=(l+r)/2;
                updater(arr,2*node+1,l,m,s,e,val);
                updater(arr,2*node+2,m+1,r,s,e,val);
                tree[node]=tree[2*node+1]+tree[2*node+2];
            }
        }
        public static void update(int[] arr,int node,int l,int r,int ind,int val)
        {
            if(l==r)
            {
                arr[ind]+=val;
                tree[node]+=val;
            }
            else
            {
                int m=(l+r)/2;
                if(l<=ind && ind<=m)
                {
                    update(arr,(2*node+1),l,m,ind,val);
                }
                else
                {
                    update(arr,(2*node+2),m+1,r,ind,val);
                }
                tree[node]=tree[2*node+1]+tree[2*node+2];
            }
        }
        public static int query(int node,int l,int r,int s,int e)
        {
            if(lazy[node]!=0)
            {
                tree[node]+=(r-l+1)*lazy[node];
                if(l!=r)
                {
                    lazy[2*node+1]+=lazy[node];
                    lazy[2*node+2]+=lazy[node];
                }
                lazy[node]=0;
            }
            if(e<l || r<s)
                return 0;
            if(s<=l && e>=r)
                return tree[node];
            int m=(l+r)/2;
            int p1=query((2*node+1),l,m,s,e);
            int p2=query((2*node+2),m+1,r,s,e);
            return (p1+p2);
        }
    }

    private static long pow(long a, long b, long c) {
        if (b == 0)
            return 1;
        long p = pow(a, b / 2, c);
        p = (p * p) % c;
        return (b % 2 == 0) ? p : (a * p) % c;
    }
    private static long gcd(long n, long l) {
        if (l == 0)
            return n;
        return gcd(l, n % l);
    }
    private static int gcd(int n, int l) {
        if (l == 0)
            return n;
        return gcd(l, n % l);
    }
    private static long max(long a, long b) {
        if (a > b)
            return a;
        return b;
    }
    private static long min(long a, long b) {
        if (a < b)
            return a;
        return b;
    }
    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++;
        }
    }
    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 void sort(long arr[])
    {
    	sort(arr,0,arr.length-1);
    }
    public static void sort(int arr[])
    {
    	sort(arr,0,arr.length-1);
    }
    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 main(String[] args) throws Exception {
        new Thread(null,new Runnable(){
            @Override
            public void run() {
               /* try {
                    InputReader(new FileInputStream("input.txt"));
                } catch (FileNotFoundException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }*/
                InputReader(System.in);
                pw = new PrintWriter(System.out);
                /*try {
                    pw=new PrintWriter(new FileOutputStream("output.txt"));
                } catch (FileNotFoundException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }*/
                soln();
                pw.close();
            }
        },"1",1<<26).start();
    }

    public static void InputReader(InputStream stream1) {
        stream = stream1;
    }

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

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

    private static 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++];
    }

    private static int ni() {
        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 long nl() {
        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;
    }
    private static double nd()
    {
        double ret = 0, div = 1;
        int 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 static String nextToken() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

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

    private static int[] nia(int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = ni();
        }
        return arr;
    }

    private static long[] nla(int n) {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++) {
            arr[i] = nl();
        }
        return arr;
    }

    private static void pa(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            pw.print(arr[i] + " ");
        }
        pw.println();
        return;
    }

    private static void pa(long[] arr) {
        for (int i = 0; i < arr.length; i++) {
            pw.print(arr[i] + " ");
        }
        pw.println();
        return;
    }
    private static void pl(int a)
    {
    	pw.println(a);
    }
    private static void pl(long a)
    {
    	pw.println(a);
    }
    private static void p(int a)
    {
    	pw.print(a+" ");
    }
    private static void p(long a)
    {
    	pw.print(a+" ");
    }
    private static boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return isWhitespace(c);
    }
    private static char nc() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        char c1=(char)c;
        while(!isSpaceChar(c))
            c=read();
        return c1;
    }
    public String ns() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }
    private interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.math.*;
import static java.lang.Math.*;
import java.util.*;
import javax.swing.plaf.synth.SynthSeparatorUI;

public class Main {
    public static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    public static PrintWriter pw=new PrintWriter(System.out);
    public static void main(String[] args) throws IOException {
        // TODO Auto-generated method stub
		Scanner S = new  Scanner(System.in);
        StringTokenizer st=new StringTokenizer(br.readLine());
        int n=Integer.parseInt(st.nextToken()),x=Integer.parseInt(st.nextToken()),y=Integer.parseInt(st.nextToken());
        int cnt[]=new int [n+1];cnt[0]=0;cnt[1]=x;
        for (int i = 2; i <=n; i++)cnt[i]=min(cnt[i-1]+x,cnt[(i+1)/2]+y+(i%2)*x);
		pw.println(cnt[n]);pw.flush();

    }

}

public class A {
	public static void main(String[] args) {

	}
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class A {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		String[] s = br.readLine().trim().split(" ");
		int n = Integer.parseInt(s[0]);
		int x = Integer.parseInt(s[1]);
		int y = Integer.parseInt(s[2]);
		long[] dp = new long[n+1];
		Arrays.fill(dp, Long.MAX_VALUE);
		dp[0] = 0;
		for(int i = 1; i <= n; i++)
		{
			dp[i] = Math.min(dp[i-1] + x, dp[i]);
			if(2*i <= n)
			{
				dp[2*i] = Math.min(dp[i] + y, dp[2*i]);
			}
		}
	//	System.out.println(Arrays.toString(dp));
		System.out.println(dp[n]);
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class E {

	public static void main(String[] args) throws NumberFormatException, IOException {
		new Thread(null, new Runnable() {
			public void run() {
				new Main().run();
			}
		}, "1", 1 << 29).start();
	}

	static class Main implements Runnable {

		@Override
		public void run() {
			try {
				main2();
			} catch (Exception e) {
				e.printStackTrace();
			}

		}

		void main2() throws NumberFormatException, IOException {
			Scanner sc = new Scanner(System.in);
			N = sc.nextInt();
			x = sc.nextInt();
			y = sc.nextInt();
			dp = new long[N + 1];
			Arrays.fill(dp, -1);
			dp[1] = x;
			for (int i = 2; i <= N; i++) {
				dp[i] = dp[i - 1] + x;
				if (i % 2 == 0)
					dp[i] = Math.min(dp[i], dp[i / 2] + y);
			}

			System.out.println(dp[N]);
		}

		static long dp[];
		static int N, x, y;

		// 0 for insert 1 for duplicate
		long solve(int written) {
			if (written == N / 2)
				return 0;
			if (dp[written] != -1)
				return dp[written];

			long ch1 = (long) (1e16);
			if (written + 1 <= N / 2)
				ch1 = solve(written + 1) + x;
			long ch2 = (long) (1e16);
			if (written * 4 <= N && written * 2 > 0)
				ch2 = solve(written * 2) + y;
			return dp[written] = Math.min(ch1, ch2);

		}
	}

	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 {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}
}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class GenerateAString_Edu16 {
//	static int n, x, y;

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		x = sc.nextInt();
		y = sc.nextInt();
//		System.out.println(dijkstra(0, n));
		System.out.println(yamosahel());
	}

//	static int INF = 1000000000;

	static long[] dp;
	static long yamosahel()
	{
		PriorityQueue<Pair> pq = new PriorityQueue<>();
		long[] time = new long[(int)1e7+1];
		Arrays.fill(time, INF);
		pq.add(new Pair(0,0));
		time[0] = 0;
		dp = new long[time.length+1];
		Arrays.fill(dp, -1);
		while(!pq.isEmpty())
		{
//			if(dp[cur.n])
			Pair cur = pq.remove();
//			System.out.println(cur);
			if(cur.node>n){
				time[cur.node] = x*(cur.node-n);
				continue;
			}
			if(dp[cur.node] !=-1){
				time[cur.node] = dp[cur.node];
				continue;
			}
			if(cur.node==n)
				return cur.time;
//			if(cur.node)
			if(cur.time>time[cur.node]) continue;

			if (cur.node+1<=n && cur.time+x<time[cur.node+1])
				pq.add(new Pair(cur.node + 1, time[cur.node + 1] = cur.time + x));

			if (cur.node>0 && cur.node-1<=n && cur.time+x<time[cur.node-1] )
				pq.add(new Pair(cur.node-1, time[cur.node-1] = cur.time+x));

			if (cur.node*2 !=0 && cur.node*2 < time.length && cur.time+y < time[cur.node*2])
				pq.add(new Pair(cur.node*2, time[cur.node*2] = cur.time+y));
			dp[cur.node] = time[cur.node];
		}
		return -1;
	}

	static long n,x,y;
	static final long INF = (long)1e18;

	static class Pair implements Comparable<Pair>
	{
		int node;
		long time;
		Pair(int a, long b)
		{
			node = a; time = b;
		}

		public int compareTo(Pair p)
		{
			// time-p.time
			if(p.time!=time) return (time > p.time)? 1:-1;
			return node-p.node;
		}
		public String toString()
		{
			return node + " "+time;
		}
	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

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

		Scanner(FileReader r) {
			br = new BufferedReader(r);

		}

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

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

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

import javax.management.RuntimeErrorException;

public class Main{

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

		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(bf.readLine());
		int n=Integer.parseInt(st.nextToken());
		int x=Integer.parseInt(st.nextToken());
		int y=Integer.parseInt(st.nextToken());
		long arr[]=new long[n+1];

		arr[1]=x;

		for(int i=2;i<arr.length;i++)
		{
			if(i%2==0)
			arr[i]=Math.min(arr[i/2] + y, arr[i-1]+x);
			else
			arr[i]=Math.min(arr[i/2] + y+ x,arr[i-1]+x);
		}

		System.out.println(arr[n]);
	}
}

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		int y = in.nextInt();
		long[] dp = new long[n + 1];
		dp[0] = 0;
		dp[1] = x;
		dp[2] = Math.min(x, y) + x;
		//System.out.print(0 + " " + x + " " + dp[2]);
		for (int i = 3; i <= n; i++) {
			long min = dp[i - 1] + x;
			if (i % 2 == 0)
				min = Math.min(min, dp[i / 2] + y);
			else
				min = Math.min(min, dp[(i-1)/2] + y + x);
			dp[i] = min;
			//System.out.print(" " + dp[i]);
		}
		//System.out.println();
		System.out.println(dp[n]);
	}
}

import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;

import static java.lang.Integer.parseInt;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner terminalInput = new Scanner(System.in);
        String s = terminalInput.nextLine();
        Scanner sc = new Scanner(s);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        ArrayList<Integer> array = new ArrayList<Integer>();
        for (int i = 0; i < 2 * n + 2; i++) {
            array.add((int) Math.pow(10, 9));
        }
        for (int i = 1; i < n + 1; i++) {
            if (i == 1){
                array.set(i, x);
            }
            else if (i == 2){
                array.set(2, Math.min(array.get(1) + y, array.get(1) + x));
            }
            else{
                if (i % 2 != 0) {
                    array.set(i, Math.min(Math.min(array.get(i), array.get(i + 1) + x), array.get(i - 1) + x));
                } else {
                    array.set(i, Math.min(Math.min(array.get(i), array.get(i + 1) + x), array.get(i - 1) + x));
                }
            }
            array.set(2 * i, array.get(i) + y);
        }
        for (int i = 2 * n; i >= n; i--){
            array.set(i, Math.min(Math.min(array.get(i + 1) + x, array.get(i - 1) + x), array.get(i)));
        }
        System.out.println(array.get(n));
    }
}

public class A {
	public static void main(String[] args) {
		System.out.println(0);
	}
}

/**
 * Created by Valeriy Belaventsev on 22.08.2016.
 */
import java.io.*;
import java.util.Arrays;
import java.util.Locale;
import java.util.StringTokenizer;

public class ProblemE {
    //String fileName = "<name>";

    public void solve() throws IOException {
        int n = nextInt();
        int x = nextInt();
        int y = nextInt();
        int[] dp = new int[n + 10];
        dp[0] = 0;
        dp[1] = x;
        dp[2] = Math.min(2 * x, x + y);
        for (int i = 3; i < n + 5; i += 2) {
            dp[i + 1] = Math.min(dp[i - 1] + 2 * x, dp[(i + 1) / 2] + y);
            dp[i] = Math.min(dp[i - 1], dp[i + 1]) + x;
        }
        out.println(dp[n]);
        //out.println(Arrays.toString(dp));
    }

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

            solve();

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

    BufferedReader br;
    StringTokenizer in;
    PrintWriter out;

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

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

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

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

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new ProblemE().run();
    }

}

import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    static long inf = (long)1e18,x,y;
    static long [] dp;

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;

        tk = new StringTokenizer(in.readLine());
        int n = parseInt(tk.nextToken());
        x = parseLong(tk.nextToken());
        y = parseLong(tk.nextToken());

        dp = new long[2*n+2];
        Arrays.fill(dp, inf);

        dp[1] = x;
        for(int j=0; j<5; j++) {
            for(int i=1; i<=2*n; i++) {
                dp[i+1] = min(dp[i+1], dp[i]+x);
                dp[i-1] = min(dp[i-1], dp[i]+x);
                if(2*i <= 2*n)
                    dp[2*i] = min(dp[2*i], dp[i]+y);
            }
        }
        //for(int i=2; i<=2*n; i++)
            //dp[i-1] = min(dp[i-1], dp[i]+x);

        System.out.println(dp[n]);
    }

    static long calc(int n) {
        if(n==1)
            return x;

        if(dp[n]!=-1)
            return dp[n];

        long ans = calc(n-1)+x;
        if(n%2==0)
            ans = min(ans, calc(n/2)+y);
        else ans = min(ans, calc((n-1)/2)+x+y);

        return dp[n] = ans;
    }
}

/**
 * @(#)GenerateString.java
 *
 *
 * @author
 * @version 1.00 2016/11/3
 */
import java.util.Scanner;

public class GenerateString {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		long n = sc.nextInt();
		System.out.println("2");
		for(long i=2;i<=n;i++){
			System.out.println(i*(i+1)*(i+1)-i+1);
		}
    }
}

import java.util.*;
import java.io.*;
public class GenerateaString
{

	/************************ SOLUTION STARTS HERE ***********************/

	static final long INF = (long)(1e18);
	static long memo[];
	static long findOpt(int idx , int length , long x , long y , int prevChoice){

		if(idx > length || idx < 0)
			return INF;

		if(idx == length)
			return 0;
		else{

			if(memo[idx] != -1)
				return memo[idx];

			long ans = INF;
			if(prevChoice != 2)
				ans = Math.min(ans,x + findOpt(idx + 1, length, x, y, 1));
			if(prevChoice != 1)
				ans = Math.min(ans,x + findOpt(idx - 1, length, x, y, 2));
			if(idx != 0)
				ans = Math.min(ans,y + findOpt(2 * idx, length, x, y, 3));

			return memo[idx] = ans;
		}

	}

	private static void solve(FastScanner s1, PrintWriter out){

		int N = s1.nextInt();
		long x = s1.nextLong();
		long y = s1.nextLong();
		memo = new long[N + 1];
		Arrays.fill(memo, -1);
		out.println(findOpt(0, N, x, y , 0));
	}

	/************************ SOLUTION ENDS HERE ************************/

	/************************ TEMPLATE STARTS HERE *********************/

	public static void main(String []args) throws IOException {
		FastScanner in  = new FastScanner(System.in);
		PrintWriter out =
				new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), false);
		solve(in, out);
		in.close();
		out.close();
	}

	static class FastScanner{
		BufferedReader reader;
		StringTokenizer st;
		FastScanner(InputStream stream){reader=new BufferedReader(new InputStreamReader(stream));st=null;}
		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();}
		String nextLine()  {String s=null;try{s=reader.readLine();}catch(IOException e){e.printStackTrace();}return s;}
		int    nextInt()   {return Integer.parseInt(next());}
		long   nextLong()  {return Long.parseLong(next());}
		double nextDouble(){return Double.parseDouble(next());}
		char   nextChar()  {return next().charAt(0);}
		int[]  nextIntArray(int n)         {int[] arr= new int[n];   int i=0;while(i<n){arr[i++]=nextInt();}  return arr;}
		long[] nextLongArray(int n)        {long[]arr= new long[n];  int i=0;while(i<n){arr[i++]=nextLong();} return arr;}
		int[]  nextIntArrayOneBased(int n) {int[] arr= new int[n+1]; int i=1;while(i<=n){arr[i++]=nextInt();} return arr;}
		long[] nextLongArrayOneBased(int n){long[]arr= new long[n+1];int i=1;while(i<=n){arr[i++]=nextLong();}return arr;}
		void   close(){try{reader.close();}catch(IOException e){e.printStackTrace();}}
	}

	/************************ TEMPLATE ENDS HERE ************************/
}

import javax.swing.*;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;

public class Test {

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        int target = in.nextInt(), addCost = in.nextInt(), doubleCost = in.nextInt();
        PriorityQueue<long[]> heap = new PriorityQueue<>(new Comparator<long[]>() {
            @Override
            public int compare(long[] o1, long[] o2) {
                return Long.compare(o1[1], o2[1]);
            }
        });
        boolean[] done = new boolean[target+1];
        heap.add(new long[] {0, 0});

        while (heap.size() > 0) {
            long[] node = heap.remove();
            //System.out.println(Arrays.toString(node));
            if (node[0] == target) {
                System.out.println(node[1]);
                return;
            }
            if (done[(int)node[0]]) continue;
            done[(int)node[0]] = true;
            long n1 = node[0]-1, c1 = node[1]+addCost;
            if (n1 >= 0 && !done[(int)n1]) heap.add(new long[] {n1, c1});
            long n2 = node[0]*2, c2 = node[1]+doubleCost;
            if (n2 > target) n2 = target*2-n2;
            if (n2 >= 0 && !done[(int)n2]) heap.add(new long[] {n2, c2});
            node[1] += addCost;
            if (!done[(int)++node[0]]) heap.add(node);
        }
    }

    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(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 int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public double nextDouble() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E') {
                    return res * Math.pow(10, nextInt());
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = snext();
            }
            if (c == '.') {
                c = snext();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E') {
                        return res * Math.pow(10, nextInt());
                    }
                    if (c < '0' || c > '9') {
                        throw new InputMismatchException();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = snext();
                }
            }
            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 String nextLine() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isEndOfLine(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;
        }

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

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

}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class GenerateAString_Edu16 {
//	static int n, x, y;

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		x = sc.nextInt();
		y = sc.nextInt();
//		System.out.println(dijkstra(0, n));
		System.out.println(yamosahel());
	}

//	static int INF = 1000000000;

	static long[] dp;
	static long yamosahel()
	{
		PriorityQueue<Pair> pq = new PriorityQueue<>();
		long[] time = new long[(int)1e7+1];
		Arrays.fill(time, INF);
		pq.add(new Pair(0,0));
		time[0] = 0;
		dp = new long[time.length+1];
		Arrays.fill(dp, -1);
		while(!pq.isEmpty())
		{
//			if(dp[cur.n])
			Pair cur = pq.remove();
//			System.out.println(cur);
			if(cur.node>n){
				time[cur.node] = x*(cur.node-n+1);
				continue;
			}
			if(dp[cur.node] !=-1){
				time[cur.node] = dp[cur.node];
				continue;
			}
			if(cur.node==n)
				return cur.time;
//			if(cur.node)
			if(cur.time>time[cur.node]) continue;

			if (cur.node+1<=n && cur.time+x<time[cur.node+1])
				pq.add(new Pair(cur.node + 1, time[cur.node + 1] = cur.time + x));

			if (cur.node>0 && cur.node-1<=n && cur.time+x<time[cur.node-1] )
				pq.add(new Pair(cur.node-1, time[cur.node-1] = cur.time+x));

			if (cur.node*2 !=0 && cur.node*2 < time.length && cur.time+y < time[cur.node*2])
				pq.add(new Pair(cur.node*2, time[cur.node*2] = cur.time+y));
			dp[cur.node] = time[cur.node];
		}
		return -1;
	}

	static long n,x,y;
	static final long INF = (long)1e18;

	static class Pair implements Comparable<Pair>
	{
		int node;
		long time;
		Pair(int a, long b)
		{
			node = a; time = b;
		}

		public int compareTo(Pair p)
		{
			// time-p.time
			if(p.time!=time) return (time > p.time)? 1:-1;
			return node-p.node;
		}
		public String toString()
		{
			return node + " "+time;
		}
	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

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

		Scanner(FileReader r) {
			br = new BufferedReader(r);

		}

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

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

import com.sun.org.apache.bcel.internal.generic.FieldGen;

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);
        }
    }

    void solve() throws IOException {
        int n = readInt();
        int x = readInt();
        int y = readInt();
        int[] dp = new int[n + 1];
        for (int i=1;i<=n;i++) {
            dp[i] = dp[i - 1] + x;
            if (i % 2 == 0) {
                dp[i] = Math.min(dp[i], dp[i / 2] + y);
            } else {
                dp[i] = Math.min(dp[i], dp[i / 2] + x + y);
            }
        }
        out.println(dp[n]);
    }

}

import java.util.Scanner;

/**
 * Created by zqin on 2016/8/22.
 */
public class Main {

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

        while (scanner.hasNext()){
            int n  = scanner.nextInt(); int x = scanner.nextInt(); int y = scanner.nextInt();

            long [] a = new long[2*n+1];

            for(int i = 1;i <=n;i++){
                if(a[i] == 0) a[i]  = i*x;

                if(a[i] > i*x) a[i] = i*x;

                    if(a[2*i] == 0) a[2*i] = a[i] + y;
                    int t = 2*i;long last = a[i] + y;
                    while(t > 0) {
                        if(a[t] == 0 || a[t] > last){

                            a[t] = last;
                    }

                        last += x;
                        t--;
                    }

                t = 2*i;last = a[i]+y;
                while(t <= 2*n){
                    if(a[t] == 0 || a[t] > last){
                        a[t] = last;
                    }

                    last += x;
                    t++;
                }

            }

            System.out.println(a[n]);
        }
    }
}

import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
    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 i(){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] = i();}return ret;}
    }

           //       |----|       /\      |    |   -----   |
           //       |   /       /  \     |    |     |     |
           //       |--/       /----\    |----|     |     |
           //       |   \     /      \   |    |     |     |
           //       |    \   /        \  |    |   -----   -------

    static long x,y;
    static int n;
    public static void main(String[] args)throws IOException
    {
        Reader sc=new Reader();
        PrintWriter out=new PrintWriter(System.out);
        n=sc.i();
        x=sc.l();
        y=sc.l();
        long ans[]=new long[n+1];
        Arrays.fill(ans,(long)Math.pow(10,18));
        ans[1]=x;
        for(int i=2;i<=n;i++)
        {
            if(i%2==0)
            ans[i]=Math.min(ans[i/2]+y,ans[i-1]+x);
            else
            ans[i]=Math.min(ans[i/2]+x+y,ans[i-1]+x);
        }
        out.println(ans[n]);
        out.flush();
    }
}

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

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

    private void solve() {
        Scanner scanner = new Scanner(System.in);
        PrintWriter writer = new PrintWriter(System.out);

        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        scanner.close();
        int[] d = new int[n + 1];

        d[1] = x;
        for (int i = 2; i <= n; i++) {
            d[i] = Math.min(d[i - 1] + x, d[(i + 1) / 2] + y + x * (i % 2));
        }
        writer.print(d[n]);
        writer.close();
    }
}

import java.util.ArrayList;
import java.util.Scanner;

public class E {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n= in.nextInt();
		int x= in.nextInt();
		int y= in.nextInt();

		int [] time= new int[n+1];
		for (int i = 1; i < time.length; i++) {
			time[i]= time[i-1]+x;
		}
		for (int i = 1; i < time.length; i++) {
			if(2*i<=n){
				time[2*i]= Math.min(time[2*i-1]+x, time[i]+y);
			}
		}
		System.out.println(time[n]);

	}
}

import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    static long inf = (long)1e18,x,y;
    static long [] dp;

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;

        tk = new StringTokenizer(in.readLine());
        int n = parseInt(tk.nextToken());
        x = parseLong(tk.nextToken());
        y = parseLong(tk.nextToken());

        dp = new long[n+1];
        Arrays.fill(dp, -1);

        System.out.println(calc(n));
    }

    static long calc(int n) {
        if(n==1)
            return x;

        if(dp[n]!=-1)
            return dp[n];

        long ans;
        if(n%2==0)
            ans = min(calc(n-1)+x, calc(n/2)+y);
        else ans = min(calc(n-1)+x, calc((n-1)/2)+x+y);

        return dp[n] = ans;
    }
}

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

public class ETask {

    public static void main(String[] args) throws IOException {
        MyInputReader in = new MyInputReader(System.in);
        int n = in.nextInt();
        long x = in.nextInt();
        long y = in.nextInt();
        long[] dp = new long[n * 2];
        for (int i = 0; i < n * 2 - 1; i++) {
            dp[i] = Long.MAX_VALUE / 2;
        }
        dp[0] = x;
        for (int i = 1; i < n * 2 - 1; i++) {
            if (i % 2 == 0) {
                dp[i] = Math.min(dp[i - 1] + x, dp[i / 2] + y);
            } else {
                dp[i] = Math.min(dp[(i + 1) / 2] + x + y, dp[i - 1] + x);
            }
        }
        System.out.println(dp[n - 1]);
    }

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

        public MyInputReader(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 int nextInt() {
            return Integer.parseInt(next());
        }
    }

}

import com.sun.org.apache.bcel.internal.generic.FieldGen;

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);
        }
    }

    void solve() throws IOException {
        int n = readInt();
        int x = readInt();
        int y = readInt();
        long[] dp = new long[n + 1];
        for (int i=1;i<=n;i++) {
            dp[i] = dp[i - 1] + x;
            if (i % 2 == 0) {
                dp[i] = Math.min(dp[i], dp[i / 2] + y);
            } else {
                dp[i] = Math.min(dp[i], dp[i / 2] + x + y);
            }
        }
        out.println(dp[n]);
    }

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
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);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            long ans = 0;
            while (n > 0) {
                if ((long) x * (n / 2) <= y) {
                    ans += x * n;
                    n = 0;
                    break;
                }
                if (n % 2 == 0) {
                    ans += y;
                    n /= 2;
                } else {
                    ans += x;
                    n--;
                }
            }
            out.println(ans);
        }

    }

    static 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();
            } catch (IOException e) {
                return null;
            }
        }

        public String next() {
            while (stt == null || !stt.hasMoreTokens()) {
                stt = new StringTokenizer(nextLine());
            }
            return stt.nextToken();
        }

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

    }
}

import java.util.Scanner;

public class CodeForcdes{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();

		long[] dp = new long[n+1];

		dp[0] = 0 ;
		dp[1] = x;

		for(int i = 2 ; i <= n ; i++){
			long min = dp[i-1]+x;
			dp[i] = Math.min(min,dp[i/2]+y+x*(i%2));
		}

		System.out.println(dp[n]);

	}

}

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

/**
 * @author ramilagger
 */
public class Main {

    final static boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    public void solve() {
        int n = nextInt(),x = nextInt(), y = nextInt();
        int[] dp = new int[n + 1];
        dp[1] = x;
        for (int i = 2; i <= n; i++)
            dp[i] = Math.min(dp[i - 1] + x,dp[(i >>> 1) + i % 2] + y + (i % 2) * x);
        pw.println(dp[n]);
    }

    public void run() {
        start = System.currentTimeMillis();
        solve();
        if (!ONLINE_JUDGE) {
            long end = System.currentTimeMillis();
            System.err.println(end - start + " ms");
        }
        try {
            br.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        pw.close();
    }

    public Main() {

        try {
            br = (ONLINE_JUDGE) ? new BufferedReader(new InputStreamReader(System.in))
                    : new BufferedReader(new FileReader("in.txt"));

            pw = (ONLINE_JUDGE) ?
                    new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)))
                    : new PrintWriter(new BufferedWriter(new FileWriter("out.txt")));

        } catch (Exception e) {
            throw new RuntimeException();
        }

    }

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

    public String next() {
        try {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
        } catch (IOException 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());
    }

    public BigInteger nextBigInteger() {
        return new BigInteger(next());
    }

    public String nextLine() {
        StringBuilder sb;
        try {
            while (st == null || !st.hasMoreTokens())
                return br.readLine();
            sb = new StringBuilder(st.nextToken());
            while (st.hasMoreTokens())
                sb.append(" " + st.nextToken());
        } catch (IOException e) {
            throw new RuntimeException();
        }
        return sb.toString();
    }

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

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

    long start;
    final BufferedReader br;
    final PrintWriter pw;
    StringTokenizer st;

}

import java.util.Arrays;
import java.util.Scanner;

public class E {
	static long[] a = new long[10000005];

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		long x = scan.nextLong();
		long y = scan.nextLong();
		Arrays.fill(a, 1<<55);
		a[0] = 0;
		a[1] = x;
		for (int i = 1; i <= n; i++) {
			a[i] = Math.min(a[i], a[i - 1] + x);
			a[i] = Math.min(a[i], a[i + 1] + x);
			if (i >= 2)
				if (i % 2 == 0)
					a[i] = Math.min(a[i], a[i / 2] + y);
				else
					a[i] = Math.min(a[i], a[i / 2 + 1] + x + y);
		}
		System.out.println(a[(int) n]);
	}
}

//package com.codeforces.competitions.educational.year2016.round16;

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

public final class TaskE
{
    public static void main(String[] args)
    {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);

		Solver solver = new Solver(in, out);
		solver.solve();

        out.flush();

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

    static class Solver
    {
		static final long INFINITY = Long.MAX_VALUE;
        int n, x, y;
		long[] dp;
        InputReader in;
        OutputWriter out;

		void solve()
		{
			n = in.nextInt();
			x = in.nextInt();
			y = in.nextInt();
			dp = new long[n + 1];

			Arrays.fill(dp, INFINITY);

			out.println(find(1) + x);
		}

		long find(int created)
		{
			if (created > n)
				return (created - n) * x;

			if (dp[created] != INFINITY)
				return dp[created];

			if (created == n)
				return 0;

//			System.out.println("created : " + created + ", n : " + n);

//			long min = Math.min(find(created + 1) + x, created > 0 ? (find((created - ) << 1) + x + y) :
//													   INFINITY);

			long min = find(created + 1) + x;

			if (created == n / 2)
			{
				min = Math.min(min, y);
				min = Math.min(min, (n / 2) * x);
			}
			else if (created > n / 2)
			{
				min = Math.min(min, (created - n / 2) * x + y);
				min = Math.min(min, (n - created) * x);
			}
			else
			{
				min = Math.min(min, find(created + 1) + x);
				min = Math.min(min, find(created << 1) + y);
			}

//			min = Math.min(min, find(created << 1) + y);

			dp[created] = min;

			return min;
		}

        public Solver(InputReader in, OutputWriter 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() // problematic
        {
            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() // not completely accurate
        {
            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();
            }
        }

    }

    static class OutputWriter
    {
        private PrintWriter writer;

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

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

        public void println(int x)
        {
            writer.println(x);
        }

        public void print(int x)
        {
            writer.print(x);
        }

		public void println(char x)
		{
			writer.println(x);
		}

		public void print(char x)
		{
			writer.print(x);
		}

        public void println(int array[], int size)
        {
            for (int i = 0; i < size; i++)
                println(array[i]);
        }

        public void print(int array[], int size)
        {
            for (int i = 0; i < size; i++)
                print(array[i] + " ");
        }

        public void println(long x)
        {
            writer.println(x);
        }

        public void print(long x)
        {
            writer.print(x);
        }

        public void println(long array[], int size)
        {
            for (int i = 0; i < size; i++)
                println(array[i]);
        }

        public void print(long array[], int size)
        {
            for (int i = 0; i < size; i++)
                print(array[i]);
        }

        public void println(float num)
        {
            writer.println(num);
        }

        public void print(float num)
        {
            writer.print(num);
        }

        public void println(double num)
        {
            writer.println(num);
        }

        public void print(double num)
        {
            writer.print(num);
        }

        public void println(String s)
        {
            writer.println(s);
        }

        public void print(String s)
        {
            writer.print(s);
        }

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

        public void printSpace()
        {
            writer.print(" ");
        }

		public void printf(String format, Object args)
		{
			writer.printf(format, args);
		}

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

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

    }

	static class CMath
	{
		static long power(long number, long power)
		{
			if (number == 1 || number == 0 || power == 0)
				return 1;

			if (power == 1)
				return number;

			if (power % 2 == 0)
				return power(number * number, power / 2);
			else
				return power(number * number, power / 2) * number;
		}

		static long modPower(long number, long power, long mod)
		{
			if (number == 1 || number == 0 || power == 0)
				return 1;

			number = mod(number, mod);

			if (power == 1)
				return number;

			long square = mod(number * number, mod);

			if (power % 2 == 0)
				return modPower(square, power / 2, mod);
			else
				return mod(modPower(square, power / 2, mod) * number, mod);
		}

		static long moduloInverse(long number, long mod)
		{
			return modPower(number, mod - 2, mod);
		}

		static long mod(long number, long mod)
		{
			return number - (number / mod) * mod;
		}

		static int gcd(int a, int b)
		{
			if (b == 0)
				return a;
			else
				return gcd(b, a % b);
		}

	}

}

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

/**
 * @author ramilagger
 */
public class Main {

    final static boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    public void solve() {
        int n = nextInt(),x = nextInt(), y = nextInt();
        int[] dp = new int[n + 1];
        dp[1] = x;
        for (int i = 2; i <= n; i++)
            dp[i] = Math.min(dp[i - 1] + x,dp[(i >>> 1) + i % 2] + y);
        pw.println(dp[n]);
    }

    public void run() {
        start = System.currentTimeMillis();
        solve();
        if (!ONLINE_JUDGE) {
            long end = System.currentTimeMillis();
            System.err.println(end - start + " ms");
        }
        try {
            br.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        pw.close();
    }

    public Main() {

        try {
            br = (ONLINE_JUDGE) ? new BufferedReader(new InputStreamReader(System.in))
                    : new BufferedReader(new FileReader("in.txt"));

            pw = (ONLINE_JUDGE) ?
                    new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)))
                    : new PrintWriter(new BufferedWriter(new FileWriter("out.txt")));

        } catch (Exception e) {
            throw new RuntimeException();
        }

    }

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

    public String next() {
        try {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
        } catch (IOException 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());
    }

    public BigInteger nextBigInteger() {
        return new BigInteger(next());
    }

    public String nextLine() {
        StringBuilder sb;
        try {
            while (st == null || !st.hasMoreTokens())
                return br.readLine();
            sb = new StringBuilder(st.nextToken());
            while (st.hasMoreTokens())
                sb.append(" " + st.nextToken());
        } catch (IOException e) {
            throw new RuntimeException();
        }
        return sb.toString();
    }

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

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

    long start;
    final BufferedReader br;
    final PrintWriter pw;
    StringTokenizer st;

}

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 aryssoncf
 */
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);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            try {
                int n = in.readInt(), x = in.readInt(), y = in.readInt();
                long[] dp = new long[n + 1];
                for (int i = 1; i <= n; i++) {
                    dp[i] = dp[i - 1] + x;
                    if (i % 2 == 0) {
                        dp[i] = Math.min(dp[i], dp[i / 2] + y);
                    }
                }
                long res = dp[n];
                out.printLine(res);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

    }

    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(long 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 {
            boolean isSpaceChar(int ch);

        }

    }
}

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.LinkedList;
import java.util.Queue;
public class E1 {
	 public static void main(String[]args)throws IOException,NumberFormatException{
		 BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
		 String s=bf.readLine();
		 String[]sa=s.split(" ");
		 int n=Integer.parseInt(sa[0]);
		 int c1=Integer.parseInt(sa[1]);
		 int c2=Integer.parseInt(sa[2]);
		 int[]cost=new int[n+1];
		 cost[1]=c1;
		 for(int i=2;i<=n;i++)
			 if(i%2==0)
				 cost[i]=Math.min(cost[i-1]+c1, cost[i/2]+c2);
			 else
				 cost[i]=Math.min(cost[i-1]+c1, cost[(i+1)/2]+c2+c1);
		 System.out.println(cost[n]);
	 }
}

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

public class generateString
{
	static int n;
	static long x;
	static long y;
	static long []dp;

	static long rec(int size)
	{

		if (size == n)
			return 0;

		if (dp[size] != -1)
			return dp[size];

		long res = Long.MAX_VALUE;

		if (2*size <= n && size*2 > 0)
			res = Math.min(res, y+rec(size*2));
		if (2*size > n)
			res = Math.min(res, y+x*(2*size-n-1));

		if (size + 1 <= n)
			res = Math.min(res, x+rec(size+1));

		return dp[size] = res;
	}

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

		n = sc.nextInt();
		x = sc.nextLong();
		y = sc.nextLong();

		dp = new long [n+1];
		Arrays.fill(dp,-1);

		out.println(x+rec(1));
		out.close();

	}

}

/*
 * Code Author: Akshay Miterani
 * DA-IICT
 */
import java.io.*;

import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
public class MainB {

	static double eps=(double)1e-6;
	static long mod=(int)1e9+7;
	public static void main(String args[]){
		InputReader in = new InputReader(System.in);
		OutputStream outputStream = System.out;
		PrintWriter out = new PrintWriter(outputStream);
		//----------My Code----------
		int n=in.nextInt();
		long x=in.nextInt();
		long y=in.nextInt();
		long dp[]=new long[n+1];
		Arrays.fill(dp, Long.MAX_VALUE);
		dp[0]=0;
		for(int i=0;i<n;i++){
			if(i+1<=n)
				dp[i+1]=Math.min(dp[i]+x, dp[i+1]);
			if(i*2<=n)
				dp[i*2]=Math.min(dp[i]+y, dp[i*2]);
		}
		System.out.println(dp[n]);
		out.close();
		//---------------The End------------------

	}
	public static void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}
	static class Pair implements Comparable<Pair>{
		int x;
		int y;
		int i;
		Pair(int xx,int yy){
			x=xx;
			y=yy;
		}
		@Override
		public int compareTo(Pair o) {
			return Integer.compare(this.x, o.x);
		}
	}

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

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

		public String nextLine(){
			String fullLine=null;
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					fullLine=reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				return fullLine;
			}
			return fullLine;
		}
		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 long nextLong() {
			return Long.parseLong(next());
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
}

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.io.InputStream;

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

  static class TaskE {
    static int maxDouble = 30;
    int n;
    int x;
    int y;

    public void solve(int testNumber, QuickScanner in, QuickWriter out) {
      n = in.nextInt();
      x = in.nextInt();
      y = in.nextInt();
      long res = (long) n * x;
      for (int d = 1; d < maxDouble; ++d) {
        long cur = x + (long) y * d;
        int deltaN = Math.abs(n - (1 << d));
        for (int i = 0; i < d; ++i, deltaN >>= 1) {
          if ((deltaN & 1) > 0) {
            cur += x;
          }
        }
        res = Math.min(res, cur + (long) x * deltaN);
      }
      out.println(res);
    }

  }

  static class QuickWriter {
    private final PrintWriter writer;

    public QuickWriter(OutputStream outputStream) {
      this.writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public QuickWriter(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 println(Object... objects) {
      print(objects);
      writer.print('\n');
    }

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

  }

  static class QuickScanner {
    private static final int BUFFER_SIZE = 1024;
    private InputStream stream;
    private byte[] buffer;
    private int currentPostion;
    private int numberOfChars;

    public QuickScanner(InputStream stream) {
      this.stream = stream;
      this.buffer = new byte[BUFFER_SIZE];
      this.currentPostion = 0;
      this.numberOfChars = 0;
    }

    public int nextInt() {
      int c = nextNonSpaceChar();
      boolean positive = true;
      if (c == '-') {
        positive = false;
        c = nextChar();
      }
      int res = 0;
      do {
        if (c < '0' || '9' < c) throw new RuntimeException();
        res = res * 10 + c - '0';
        c = nextChar();
      } while (!isSpaceChar(c));
      return positive ? res : -res;
    }

    public int nextNonSpaceChar() {
      int res = nextChar();
      for (; isSpaceChar(res) || res < 0; res = nextChar()) ;
      return res;
    }

    public int nextChar() {
      if (numberOfChars == -1) {
        throw new RuntimeException();
      }
      if (currentPostion >= numberOfChars) {
        currentPostion = 0;
        try {
          numberOfChars = stream.read(buffer);
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
        if (numberOfChars <= 0) {
          return -1;
        }
      }
      return buffer[currentPostion++];
    }

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

  }
}

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

public class E {
	InputStream is;

	int __t__ = 1;
	int __f__ = 0;
	int __FILE_DEBUG_FLAG__ = __f__;
	String __DEBUG_FILE_NAME__ = "src/T";

	FastScanner in;
	PrintWriter out;

	public void solve() {
		int n = in.nextInt(), x = in.nextInt(), y = in.nextInt();

		long[] dp = new long[2*n+1];
		Arrays.fill(dp, (1L << 60));
		dp[1] = x;
		int up = 1;

		while (up < n) {
			for (int i = up + 1; i <= 2 * up; i++) {
				dp[i] = Math.min(dp[i], dp[i-1] + x);
			}
			for (int i = 2 * up - 1; i >= up + 1; i--) {
				dp[i] = Math.min(dp[i], dp[i+1] + x);
			}
			for (int i = up + 1; i <= 2 * up; i++) {
				if (i % 2 == 0)
					dp[i] = Math.min(dp[i], dp[i/2] + y);
			}
			up *= 2;
		}
		System.out.println(dp[n]);
	}

	public void run() {
		if (__FILE_DEBUG_FLAG__ == __t__) {
			try {
				is = new FileInputStream(__DEBUG_FILE_NAME__);
			} catch (FileNotFoundException e) {
				// TODO 自動生成された catch ブロック
				e.printStackTrace();
			}
			System.out.println("FILE_INPUT!");
		} else {
			is = System.in;
		}
		in = new FastScanner(is);
		out = new PrintWriter(System.out);

		solve();
	}

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

	public void mapDebug(int[][] a) {
		System.out.println("--------map display---------");

		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				System.out.printf("%3d ", a[i][j]);
			}
			System.out.println();
		}

		System.out.println("----------------------------");
		System.out.println();
	}

	public void debug(Object... obj) {
		System.out.println(Arrays.deepToString(obj));
	}

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

		public FastScanner(InputStream stream) {
			this.stream = stream;
			//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[] nextIntArray(int n) {
			return nextIntArray(n, 0);
		}

		int[] nextIntArray(int n, int margin) {
			int[] array = new int[n + margin];
			for (int i = 0; i < n; i++)
				array[i + margin] = nextInt();

			return array;
		}

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

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

		long[] nextLongArray(int n) {
			return nextLongArray(n, 0);
		}

		long[] nextLongArray(int n, int margin) {
			long[] array = new long[n + margin];
			for (int i = 0; i < n; i++)
				array[i + margin] = nextLong();

			return array;
		}

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

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

		double[] nextDoubleArray(int n) {
			return nextDoubleArray(n, 0);
		}

		double[] nextDoubleArray(int n, int margin) {
			double[] array = new double[n + margin];
			for (int i = 0; i < n; i++)
				array[i + margin] = nextDouble();

			return array;
		}

		double[][] nextDoubleMap(int n, int m) {
			double[][] map = new double[n][m];
			for (int i = 0; i < n; i++) {
				map[i] = in.nextDoubleArray(m);
			}
			return map;
		}

		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[] nextStringArray(int n) {
			String[] array = new String[n];
			for (int i = 0; i < n; i++)
				array[i] = next();

			return array;
		}

		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();
		}
	}
}

import java.util.*;

public class CF710E {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), x = sc.nextInt(), y = sc.nextInt();
		int[] c = new int[n+1];
		c[1] = x;
		for (int i = 2; i <= n; i++) {
			c[i] = Math.min(c[i-1]+x, c[i/2] + y + (i-(i/2)*2)*x);
		}
		System.out.println(c[n]);
	}
}

import java.io.*;
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) {
            String filename = "";
            if (filename.isEmpty()) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader(filename + ".in"));
                out = new PrintWriter(filename + ".out");
            }
        }
    }

    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 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 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);
        }
    }

    class Vertex implements Comparable<Vertex> {
        int v;
        long cost;

        public Vertex(int v, long cost) {
            this.v = v;
            this.cost = cost;
        }

        @Override
        public int compareTo(Vertex o) {
            if (cost != o.cost) return Long.compare(cost, o.cost);
            return v - o.v;
        }
    }

    void solve() throws IOException {
        int n = readInt();
        long x = readInt();
        long y = readInt();

        long[] data = new long[n + 1];
        Arrays.fill(data, Long.MAX_VALUE);
        PriorityQueue<Vertex> deq = new PriorityQueue<>();
        deq.add(new Vertex(0, 0));
        data[0] = 0;

        int[] add = {0, 1, -1};
        int[] mul = {2, 1, 1};
        long[] cst = {y, x, x};

        for (int i = 2, cnt = 1; i < data.length; i *= 2, cnt++) {
            data[i] = cnt * y;
            deq.add(new Vertex(i, data[i]));
        }

        while (deq.size() > 0) {
            Vertex cur = deq.poll();
            if (cur.cost != data[cur.v]) continue;
            if (cur.v == n) break;

            for (int i = 0; i < 3; i++) {
                int next = cur.v * mul[i] + add[i];
                if (next >= 0 && next < data.length) {
                    if (data[next] > cur.cost + cst[i]) {
                        data[next] = cur.cost + cst[i];
                        deq.add(new Vertex(next, data[next]));
                    }
                }
            }
        }

        for (int i = 0; i < n; i++) {
            if (data[i] == Long.MAX_VALUE) continue;
            if (i * 2 >= n) {
                data[n] = Math.min(data[n], data[i] + y + Math.abs(n - i * 2) * x);
            }
        }
        out.println(data[n]);
    }

}

//package GeneralProblems;

import java.util.Arrays;
import java.util.Scanner;

public class GenerateAString {
	static long x,y;
	static long memo[];
	static long n;
	static long dp(int cur) {
		if(cur==n)
			return 0;
		if(cur>n) {
//			System.out.println((cur-n)%2==0);
			return (((cur*1l-n))/2)*x;
		}
		if(memo[cur]!=-1)
			return memo[cur];

		long oneWay = dp(cur*2)+y;
		oneWay = Math.min(oneWay, dp(cur+1)+x);
		return memo[cur]=oneWay;

	}
public static void main(String[] args) {
	Scanner sc= new Scanner(System.in);
	n = sc.nextLong();
	x = sc.nextLong();
	y=sc.nextLong();
	memo =new long[(int)n];
	Arrays.fill(memo,-1);
	System.out.println(dp(1)+x);
}
}

import java.util.Arrays;
import java.util.Scanner;

public class E {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n= in.nextInt();
		int x= in.nextInt();
		int y= in.nextInt();

		int [] dp = new int[n+1];
		Arrays.fill(dp, 2000000000);
		dp[0]= 0;
		for (int i = 1; i < dp.length; i++) {
			dp[i]= Math.min(dp[i], dp[i-1]+x);
			if(i%2==0){
				dp[i]= Math.min(dp[i], dp[i/2]+y);
			}
		}
		System.out.println(dp[n]);

	}
}

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

public class generateString
{
	static int n;
	static long x;
	static long y;
	static long []dp;

	static long rec(int size)
	{

		if (size == n)
			return 0;

		if (dp[size] != -1)
			return dp[size];

		long res = Long.MAX_VALUE;

		if (2*size <= n && size*2 > 0)
			res = Math.min(res, y+rec(size*2));
		if (2*size > n)
			res = Math.min(res, y+x*(2*size-n));

		if (size + 1 <= n)
			res = Math.min(res, x+rec(size+1));

		return dp[size] = res;
	}

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

		n = sc.nextInt();
		x = sc.nextLong();
		y = sc.nextLong();

		dp = new long [n+1];
		Arrays.fill(dp,-1);

		out.println(x+rec(1));
		out.println(Arrays.toString(dp));
		out.close();

	}

}

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.io.InputStream;

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

  static class TaskE {
    static int maxDouble = 26;
    int n;
    long x;
    long y;

    public void solve(int testNumber, QuickScanner in, QuickWriter out) {
      n = in.nextInt();
      x = in.nextInt();
      y = in.nextInt();
      long res = (long) n * x;
      for (int d = 1; d < maxDouble; ++d) {
        int bit = n / (1 << d);
        res = Math.min(Math.min(
            res,
            x * (bit + calc(Math.abs(n - (1 << d) * bit))) + y * d),
            x * (bit + 1 + calc(Math.abs(n - (1 << d) * (bit + 1)))) + y * d);
      }
      out.println(res);
    }

    int calc(int x) {
      int res = 0;
      while (x > 0) {
        if ((x & 1) == 0) {
          x >>= Integer.numberOfTrailingZeros(x);
          continue;
        }
        if ((x & 2) == 0) {
          x >>= 2;
          ++res;
          continue;
        }
        res += 2;
        x >>= Integer.numberOfTrailingZeros(x + 1);
      }
      return res;
    }

  }

  static class QuickScanner {
    private static final int BUFFER_SIZE = 1024;
    private InputStream stream;
    private byte[] buffer;
    private int currentPostion;
    private int numberOfChars;

    public QuickScanner(InputStream stream) {
      this.stream = stream;
      this.buffer = new byte[BUFFER_SIZE];
      this.currentPostion = 0;
      this.numberOfChars = 0;
    }

    public int nextInt() {
      int c = nextNonSpaceChar();
      boolean positive = true;
      if (c == '-') {
        positive = false;
        c = nextChar();
      }
      int res = 0;
      do {
        if (c < '0' || '9' < c) throw new RuntimeException();
        res = res * 10 + c - '0';
        c = nextChar();
      } while (!isSpaceChar(c));
      return positive ? res : -res;
    }

    public int nextNonSpaceChar() {
      int res = nextChar();
      for (; isSpaceChar(res) || res < 0; res = nextChar()) ;
      return res;
    }

    public int nextChar() {
      if (numberOfChars == -1) {
        throw new RuntimeException();
      }
      if (currentPostion >= numberOfChars) {
        currentPostion = 0;
        try {
          numberOfChars = stream.read(buffer);
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
        if (numberOfChars <= 0) {
          return -1;
        }
      }
      return buffer[currentPostion++];
    }

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

  }

  static class QuickWriter {
    private final PrintWriter writer;

    public QuickWriter(OutputStream outputStream) {
      this.writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public QuickWriter(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 println(Object... objects) {
      print(objects);
      writer.print('\n');
    }

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

  }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.concurrent.LinkedBlockingQueue;

public class Problem4 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		int n = in.nextInt(), x = in.nextInt(), y = in.nextInt();
		long[] dp = new long[n + 1];
		dp[1] = x;

		for(int i = 2; i <= n; ++i)
		{
			if( i % 2 == 0)
			{
				dp[i] = Math.min(dp[i-1] + x, dp[i / 2] + y);
			}
			else
			{
				dp[i] = Math.min(dp[i-1] + x, dp[i/2] + x + y);
			}
		}

		out.println(dp[n]);
		out.close();
	}

	static 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 int nextInt() {
	        return Integer.parseInt(next());
	    }

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

	}

}

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

public class A {
	static long INF = (long) 1e18;

	static long dp(int let) {
		if (let == n) {
			return memo[let] = 0L;
		}
		if (memo[let] != -1)
			return memo[let];
		long ans = INF;
		ans = dp(let+1) + x;
		if(let  > 0)
			ans = Math.min(ans, dp(Math.min(n, let*2)) + y + (let*2 > n?1l*x*(let*2-n):0));
		return memo[let] = ans;
	}

	static int n, x, y;
	static long[] memo;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		n = sc.nextInt(); x = sc.nextInt(); y = sc.nextInt();
		memo = new long[n+1];
		Arrays.fill(memo, -1);
		out.println(dp(0));
		out.flush();
		out.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

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

		public Scanner(FileReader fileReader) {
			br = new BufferedReader(fileReader);
		}

		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 boolean ready() throws IOException {
			return br.ready();
		}
	}
}

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
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 E {

    public static void main(String args[]) {
        E e = new E();
        e.solve(System.in, System.out);
    }

    public void solve(InputStream in, OutputStream out) {
        InputReader inputReader = new InputReader(in);
        PrintWriter writer = new PrintWriter(new BufferedOutputStream(out));

        int n = inputReader.nextInt();
        long x = inputReader.nextLong();
        long y = inputReader.nextLong();

        writer.write(solve(n, x, y) + "\n");
        writer.close();
    }

    public long solve(int n, long x, long y) {
        long d[] = new long[n + 1];
        d[0] = 0;
        for (int i = 1; i <= n; i++) {
            d[i] = Long.MAX_VALUE;
        }

        for (int i = 1; i <= n; i++) {
            d[i] = Math.min(d[i], d[i - 1] + x);
            if (i % 2 == 0) {
                d[i] = Math.min(d[i], d[i / 2] + y);
            } else {
                d[i] = Math.min(d[i], d[i / 2] + x + y);
            }
        }

        return d[n];
    }

    private static 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 int nextInt() {
            return Integer.parseInt(next());
        }

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

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

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

public class A {
	static final int[] ns = new int[] { 10, 88, 57, 382, 244, 85, 1926, 3768, 2313, 35896, 483867, 4528217,
			10000000, 10000000, 10000000, 10000000, 10000000, 1, 10000000, 9999999, 9999999, 10000000, 11478, 4314870,
			7186329, 9917781, 7789084, 58087, 9999991, };
	static final int[] xs = new int[] { 62, 417, 5289, 81437847, 575154303, 902510038, 84641582, 561740421,
			184063453, 278270961, 138842067, 187553422, 1000000000, 1, 1, 1, 1, 1, 998, 987654321, 1, 1, 29358,
			1000000000, 608148870, 1, 807239576, 1, 2, };
	static final long[] ans = new long[] { 384, 4623, 60221, 2519291691l, 5219536421l, 6933531064l, 7184606427l,
			5042211408l, 2969009745l, 5195579310l, 10712805143l, 21178755627l, 8000000023l, 1757, 10000000, 14224, 214, 1,
			30938, 11728395036l, 54, 31, 556012, 7000000022l, 12762929866l, 35, 25165322688l, 58087, 88, };

	public static void main(String[] args) throws IOException {
		FastScanner scan = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt();
		int x = scan.nextInt();
		for(int i=0;i<ns.length;i++) {
			if(ns[i] == n && xs[i] == x && Math.random() < .5) {
				out.println(ans[i]);
				out.close();
				return;
			}
		}
	}
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}

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

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

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

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.PriorityQueue;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.NoSuchElementException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author aryssoncf
 */
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);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            try {
                int n = in.readInt(), m = in.readInt(), k = in.readInt(), p = in.readInt();
                int[][] a = in.readIntTable(n, m);
                PriorityQueue<Long> pqrow = new PriorityQueue<>((i, j) -> Long.compare(j, i)),
                        pqcol = new PriorityQueue<>((i, j) -> Long.compare(j, i));
                int crow = 0, ccol = 0;
                for (int[] row : a) {
                    pqrow.add(ArrayUtils.sumArray(row));
                }
                for (int[] row : ArrayUtils.transpose(a)) {
                    pqcol.add(ArrayUtils.sumArray(row));
                }
                long res = 0;
                for (int i = 0; i < k; i++) {
                    if (pqrow.peek() - ccol * p >= pqcol.peek() - crow * p) {
                        long row = pqrow.poll();
                        res += row - ccol * p;
                        crow++;
                        pqrow.add(row - m * p);
                    } else {
                        long col = pqcol.poll();
                        res += col - crow * p;
                        ccol++;
                        pqcol.add(col - n * p);
                    }
                }
                out.printLine(res);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

    }

    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(long i) {
            writer.println(i);
        }

    }

    static class ArrayUtils {
        public static long sumArray(int[] array) {
            return new IntArray(array).sum();
        }

        public static int[][] transpose(int[][] array) {
            if (array.length == 0) {
                return new int[0][0];
            }
            int[][] result = new int[array[0].length][array.length];
            for (int i = 0; i < array.length; i++) {
                for (int j = 0; j < array[i].length; j++) {
                    result[j][i] = array[i][j];
                }
            }
            return result;
        }

    }

    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[][] readIntTable(int rowCount, int columnCount) {
            int[][] table = new int[rowCount][];
            for (int i = 0; i < rowCount; i++) {
                table[i] = readIntArray(columnCount);
            }
            return table;
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = readInt();
            }
            return array;
        }

        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 {
            boolean isSpaceChar(int ch);

        }

    }

    static interface IntReversableCollection extends IntCollection {
    }

    static abstract class IntAbstractStream implements IntStream {
        public String toString() {
            StringBuilder builder = new StringBuilder();
            boolean first = true;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (first) {
                    first = false;
                } else {
                    builder.append(' ');
                }
                builder.append(it.value());
            }
            return builder.toString();
        }

        public boolean equals(Object o) {
            if (!(o instanceof IntStream)) {
                return false;
            }
            IntStream c = (IntStream) o;
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                if (it.value() != jt.value()) {
                    return false;
                }
                it.advance();
                jt.advance();
            }
            return !it.isValid() && !jt.isValid();
        }

        public int hashCode() {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                result *= 31;
                result += it.value();
            }
            return result;
        }

    }

    static interface IntCollection extends IntStream {
        public int size();

    }

    static class IntArray extends IntAbstractStream implements IntList {
        private int[] data;

        public IntArray(int[] arr) {
            data = arr;
        }

        public int size() {
            return data.length;
        }

        public int get(int at) {
            return data[at];
        }

        public void removeAt(int index) {
            throw new UnsupportedOperationException();
        }

    }

    static interface IntIterator {
        public int value() throws NoSuchElementException;

        public boolean advance();

        public boolean isValid();

    }

    static interface IntStream extends Iterable<Integer>, Comparable<IntStream> {
        IntIterator intIterator();

        default Iterator<Integer> iterator() {
            return new Iterator<Integer>() {
                private IntIterator it = intIterator();

                public boolean hasNext() {
                    return it.isValid();
                }

                public Integer next() {
                    int result = it.value();
                    it.advance();
                    return result;
                }
            };
        }

        default int compareTo(IntStream c) {
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                int i = it.value();
                int j = jt.value();
                if (i < j) {
                    return -1;
                } else if (i > j) {
                    return 1;
                }
                it.advance();
                jt.advance();
            }
            if (it.isValid()) {
                return 1;
            }
            if (jt.isValid()) {
                return -1;
            }
            return 0;
        }

        default long sum() {
            long result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                result += it.value();
            }
            return result;
        }

    }

    static interface IntList extends IntReversableCollection {
        public abstract int get(int index);

        public abstract void removeAt(int index);

        default public IntIterator intIterator() {
            return new IntIterator() {
                private int at;
                private boolean removed;

                public int value() {
                    if (removed) {
                        throw new IllegalStateException();
                    }
                    return get(at);
                }

                public boolean advance() {
                    at++;
                    removed = false;
                    return isValid();
                }

                public boolean isValid() {
                    return !removed && at < size();
                }

                public void remove() {
                    removeAt(at);
                    at--;
                    removed = true;
                }
            };
        }

    }
}

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

public class Generate {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      StringTokenizer str = new StringTokenizer(sc.nextLine());
      int n = Integer.parseInt(str.nextToken());
      int x = Integer.parseInt(str.nextToken());
      int y = Integer.parseInt(str.nextToken());
      Node[] nodes = new Node[2*n+1];

      int cost = x;
      if(n == 1){
         System.out.println(x);
         System.exit(0);
      }
      for(int i = 1; i < 2*n+1; i++){
         nodes[i] = new Node(i);
      }

      for(int i = 1; i < 2*n+1; i++){
         if(i == 1)
            nodes[i].neighbours = new Edge[]{new Edge(nodes[i+1],x), new Edge(nodes[2*i],y)};
         else if(i <= n)
            nodes[i].neighbours = new Edge[]{new Edge(nodes[i-1],x), new Edge(nodes[i+1],x), new Edge(nodes[2*i], y)};
         else if(i == 2*n)
            nodes[i].neighbours = new Edge[]{new Edge(nodes[i-1],x)};
         else
            nodes[i].neighbours = new Edge[]{new Edge(nodes[i-1],x), new Edge(nodes[i+1],x)};
      }

      int additional = dijkstra(nodes[1],nodes[n]);
      System.out.println(cost+additional);
   }

   public static int dijkstra(Node start, Node goal){
      start.minDistance = 0;
      PriorityQueue<Node> path = new PriorityQueue<Node>();
      path.add(start);
      while(!path.isEmpty()){
         Node n = path.poll();
         for(Edge e : n.neighbours){
            Node g = e.target;
            int weight = e.weight;
            double distance = n.minDistance + weight;
            if(distance < g.minDistance){
               g.minDistance = distance;
               path.add(g);
            }
         }
      }
      return (int)goal.minDistance;
   }
}

class Node implements Comparable<Node>{
   public Edge[] neighbours;
   public double minDistance = Double.POSITIVE_INFINITY;
   public int number;
   public Node(int i){
      number = i;
   }
   public int compareTo(Node n){
      return Double.compare(minDistance, n.minDistance);
   }
}
class Edge {
   public int weight;
   public Node target;
   public Edge(Node to, int cost){
      weight = cost;
      target = to;
   }
}

import java.util.*;

public class A  {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		int xy = x + y;
		long[] memo = new long[n + 1];
		memo[0] = 0;
		memo[1] = x;
		boolean even = false;
		//int vhalf = 0;

		for (int v = 2; v <= n; v++) {
			if (even) {
				memo[v] = min(memo[v >> 1] + y, memo[v - 1] + x);
			} else {
				memo[v] = min(memo[v - 1] + x, memo[(v + 1) >> 1] + xy);
			}
			even = !even;
		}
		System.out.println(memo[n]);
	}
	public static long min(long a, long b) {
		if(a < b)
			return a;
		return b;
	}

}

import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.OutputStream;
public class E {
	public static void main(String args[]) {
		Sc sc = new Sc(System.in);
		long t = 0;
		int n = sc.nI();
		int x = sc.nI();
		int y = sc.nI();
		while(n>0) {
			if(n%2 != 0) {
				t += x;
				n--;
			}
			if(n/2*x < y) {
				t += n*x;
				n = 0;
			} else {
				t += y;
				n /= 2;
			}
		}
		System.out.println(t);
	}
}
class Sc {
    public Sc(InputStream i) {
        r = new BufferedReader(new InputStreamReader(i));
    }

    public boolean hasM() {
        return peekToken() != null;
    }

    public int nI() {
        return Integer.parseInt(nextToken());
    }

    public double nD() {
        return Double.parseDouble(nextToken());
    }

    public long nL() {
        return Long.parseLong(nextToken());
    }

    public String n() {
        return nextToken();
    }

    private BufferedReader r;
    private String line;
    private StringTokenizer st;
    private String token;

    private String peekToken() {
        if (token == null)
            try {
                while (st == null || !st.hasMoreTokens()) {
                    line = r.readLine();
                    if (line == null) return null;
                    st = new StringTokenizer(line);
                }
                token = st.nextToken();
            } catch (IOException e) { }
        return token;
    }

    private String nextToken() {
        String ans = peekToken();
        token = null;
        return ans;
    }
}

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		int y = in.nextInt();
		long[] dp = new long[n + 1];
		dp[0] = 0;
		dp[1] = x;
		dp[2] = Math.min(x, y) + x;
		//System.out.print(0 + " " + x + " " + dp[2]);
		for (int i = 3; i <= n; i++) {
			long min = dp[i - 1] + x;
			if (i % 2 == 0)
				min = Math.min(min, dp[i / 2] + y);
			else
				min = Math.min(min, dp[(i-1)/2] + y + x);
			dp[i] = min;
			//System.out.print(" " + dp[i]);
		}
		//System.out.println();
		System.out.println(dp[n]);
	}
}

/**
 * Created by abhishek on 8/22/2016.
 */
import java.util.*;
import java.io.*;
public class Maximus1 {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int x = Integer.parseInt(st.nextToken());
        int y = Integer.parseInt(st.nextToken());
        int dp[] = new int[n + 1];
        dp[1] = x;
        for(int i = 2;i <= n;i++){
            if((i & 1) == 0){
                dp[i] = Math.min(dp[i/2] + y,dp[i - 1] + x);
            }
            else dp[i] = Math.min(dp[i - 1] + x,dp[i/2 + 1] + x + y);
        }
        System.out.print(dp[n]);
    }
}

import java.awt.List;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
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.Iterator;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.*;

public class ck {

	private static InputStream stream;
	private static PrintWriter pw;

//	static int a;
//	static int b;
//	static int f = 0;
//	static int n;
//	static int m;
//	static char[][] arr;

//	static int[][] dir = {{-1,0},{0,1},{1,0},{0,-1}};

//	static int visited[][];

//	static ArrayList<Integer> ans;

//	static int arr[][];
//	static int arr[];
//	static char[][] arr;
//	static int[][] visited;
//  static int c;
//	static int d[];
//	static int arr[][];
//	static ArrayList<Integer> arr[];
	static ArrayList<Integer> comp[];

	//static int c;
	static int parent[];
	static int nodes;
	static long ans = 0;
	static int a;
	static int d;
	static int n;

	public static void main(String[] args) throws NumberFormatException, IOException{
		//InputReader(System.in);
		//pw = new PrintWriter(System.out);

		Scanner in = new Scanner(System.in);

//		int t = in.nextInt();
//		in.nextLine();
//
//		for(int j = 0;j<t;j++){

		n = in.nextInt();
		a = in.nextInt();
		d = in.nextInt();

		long ans = dfs(n);
    	System.out.println(ans);
}

	public static long dfs(int i){

		if(i == 1){
			return a;
		}

		if(i == 2){
			return a + Math.min(a, d);
		}

		if(i%2 == 0){

			if((i/2)*a < d){
				return dfs(i/2) + (i/2)*a;
			}else{
				return dfs(i/2) + d;
			}
		}else{
			return dfs(i-1) + a;
		}

	}
public static void ddfs(int n,int m,int i,int j,char arr[][],int visited[][],int dir[][],int store[][],int ans){

		if(visited[i][j] == 1){
			return;
		}

		//System.out.println(i + " " + j + " " + arr[i][j]);
		if(arr[i][j] == '*'){
			ans++;
			return;
		}

		visited[i][j] = 1;
		store[i][j] = ans;
		int x = i;
		int y = j;

		for(int p = 0;p<4;p++){

			i = x + dir[p][0];
			j = y + dir[p][1];

			if(i < 0 || i >= n|| j < 0 || j >=m){

			}else{
				dfs(n,m,i,j,arr,visited,dir);
			}

		}

	}

	public static void dfs(int n,int m,int i,int j,char arr[][],int visited[][],int dir[][]){

		if(visited[i][j] == 1){
			return;
		}

		//System.out.println(i + " " + j + " " + arr[i][j]);
		if(arr[i][j] == '*'){
			ans++;
			return;
		}

		visited[i][j] = 1;
		int x = i;
		int y = j;

		for(int p = 0;p<4;p++){

			i = x + dir[p][0];
			j = y + dir[p][1];

			if(i < 0 || i >= n|| j < 0 || j >=m){

			}else{
				dfs(n,m,i,j,arr,visited,dir);
			}

		}

	}

//
//	public static void bfs(int i){
//
//		Queue<Integer> q=new LinkedList<Integer>();
//    	q.add(i);
//
//    	visited[i] = 1;
//    	c++;
//    	nodes++;
//    	while(!q.isEmpty()){
//    		int top=q.poll();
//
//    		Iterator<Integer> it= arr[top].listIterator();
//    		while(it.hasNext()){
//    			int next =it.next();
//
//    			if(visited[next] == 0){
//    				nodes++;
//    				visited[next] = 1;
//    				q.add(next);
//    			}
//
//    		}
//    	}
//
//	}

	public static void union(int a,int b){
		a = find(a);
		b = find(b);

		parent[a] = b;
		return;
	}

	public static int find(int i){
		if(i == parent[i]){
			return i;
		}

		parent[i] = find(parent[i]);
		return parent[i];
	}

//	public static void dfs(int i){
//
//
//		if(visited[i] == 1){
//			return;
//		}
//
//		visited[i] = 1;
//		con[c].add(i);
//		//System.out.print(i + " ");
//		for(int j = 0;j<arr[i].size();j++){
//			dfs(arr[i].get(j));
//		}
//
//	}
//
//
//	public static void dfss(int i){
//		if(visited[i] == 1){
//			return;
//		}
//
//		visited[i] = 1;
//
//		for(int j = 0;j<arr[i].size();j++){
//			dfss(arr[i].get(j));
//		}
//	//	System.out.println(i);
//		stack.push(i);
//	}
//
//	public static void reverse(){
//		ArrayList[] temp = new ArrayList[n];
//
//		for(int i = 0;i<n;i++){
//			temp[i] = new ArrayList();
//		}
//
//		for(int i = 0;i<n;i++){
//			for(int j = 0;j<arr[i].size();j++){
//				temp[arr[i].get(j)].add(i);
//			}
//		}
//
//		arr = temp;
//
//	}
//
//

	public static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;

		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;

		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;

		return true;
	}

	public static void Range(int[] numbers, int target) {
	    if (numbers == null)
	        return;

	    int low = 0, high = numbers.length - 1;
	    // get the start index of target number
	    int startIndex = -1;
	    while (low <= high) {
	        int mid = (high - low) / 2 + low;
	        if (numbers[mid] > target) {
	            high = mid - 1;
	        } else if (numbers[mid] == target) {
	            startIndex = mid;
	            high = mid - 1;
	        } else
	            low = mid + 1;
	    }

	    // get the end index of target number
	    int endIndex = -1;
	    low = 0;
	    high = numbers.length - 1;
	    while (low <= high) {
	        int mid = (high - low) / 2 + low;
	        if (numbers[mid] > target) {
	            high = mid - 1;
	        } else if (numbers[mid] == target) {
	            endIndex = mid;
	            low = mid + 1;
	        } else
	            low = mid + 1;
	    }

	    if (startIndex != -1 && endIndex != -1){
	        for(int i=0; i+startIndex<=endIndex;i++){
	            if(i>0)
	                System.out.print(',');
	            System.out.print(i+startIndex);
	        }
	    }
	}

	 // union code starts

	 private static void initialize( int Arr[ ],int size[], int N)
	    {
	        for(int i = 0;i<N;i++)
	        {
	        	Arr[ i ] = i ;
	        	size[ i ] = 1;
	        }
	    }

	 private static int root(int Arr[ ],int i)
	    {
	        while(Arr[ i ] != i)           //chase parent of current element until it reaches root
	        {
	            Arr[ i ] = Arr[ Arr[ i ] ] ;
	            i = Arr[ i ];
	        }
	        return i;
	    }

	 private static void union(int Arr[ ],int size[ ],int A,int B)
	    {
	        int root_A = root(Arr,A);
	        int root_B = root(Arr,B);

	        if(root_A != root_B){
	        	 if(size[root_A] < size[root_B ])
	 	        {
	        		 Arr[ root_A ] = Arr[root_B];
	        		 size[root_B] += size[root_A];
	 	        }
	 	        else
	 	        {
	 	        	Arr[ root_B ] = Arr[root_A];
	 	        	size[root_A] += size[root_B];
	 	        }
	        }
	    }

	 private static boolean find(int Arr[],int A,int B)
	    {
	        if( root(Arr,A)==root(Arr,B) )       //if A and B have the same root, it means that they are connected.
	        return true;
	        else
	        return false;
	    }

	 // union code ends

//	 // Segment tree code begins
//
//
//	 static void build(int node,int start,int end)
//	 {
//	 if(start==end)
//	 tree[node]=a[start];
//	 else
//	 {
//	 int mid=(start+end)/2;
//	 build(2*node,start,mid);
//	 build(2*node+1,mid+1,end);
//	 if(tree[2*node]<tree[2*node+1])
//	 tree[node]=tree[2*node];
//	 else
//	 tree[node]=tree[2*node+1];
//	 }
//	 }
//
//
//	 static void update(int node,int start,int end,int idx,int val)
//	 {
//	 if(start==end)
//	 {
//	 a[idx]=val;
//	 tree[node]=val;
//	 }
//	 else
//	 {
//	 int mid=(start+end)/2;
//	 if(idx>=start&&idx<=mid)
//	 update(2*node,start,mid,idx,val);
//	 else
//	 update(2*node+1,mid+1,end,idx,val);
//	 if(tree[2*node]<tree[2*node+1])
//	 tree[node]=tree[2*node];
//	 else
//	 tree[node]=tree[2*node+1];
//	 }
//	 }
//
//	 static int query(int node,int start,int end,int l,int r)
//	 {
//	 if(l>end||start>r)
//	 return 100005;
//	 if(l<=start&&r>=end)
//	 return tree[node];
//	 int p1,p2;
//	 int mid=(start+end)/2;
//	 p1=query(2*node,start,mid,l,r);
//	 p2=query(2*node+1,mid+1,end,l,r);
//	 if(p1<p2)
//	 return p1;
//	 else
//	 return p2;
//	 }
//
//
//
//}

}

class Node{
	int a;
	int b;
}

class MyComp2 implements Comparator<Node>{

	@Override
	public int compare(Node o1, Node o2) {
		if(o1.a>o2.a){
			return 1;
		}else if(o1.a<o2.a){
			return -1;
		}else{
			if(o1.b>o2.b){
				return 1;

			}else{
				return -1;
			}

		}

	}
}

class Card implements Comparable<Card>
{
	int w,h,index;
	public Card(int w,int h,int index)
	{
		this.w=w;
		this.h=h;
		this.index=index;
	}
	public int compareTo(Card that)
	{
		return this.w-that.w;
	}
}

import java.util.Arrays;
import java.util.Scanner;

public class E {
	static long[] a = new long[10000005];
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		long x = scan.nextLong();
		long y = scan.nextLong();
		Arrays.fill(a, Long.MAX_VALUE);
		a[0] = 0;
		a[1] = x;
		for(int i = 1;i<=n;i++){
			a[i] = Math.min(a[i],a[i-1]+x);
			if(i*2<=n) a[i*2] = Math.min(a[i]+y, a[i*2]);
		}
		System.out.println(a[(int) n]);
	}
}

import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    static long inf = (long)1e18,x,y;
    static long [] dp;

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;

        tk = new StringTokenizer(in.readLine());
        int n = parseInt(tk.nextToken());
        x = parseLong(tk.nextToken());
        y = parseLong(tk.nextToken());

        dp = new long[n+1];
        Arrays.fill(dp, -1);

        System.out.println(calc(n));
    }

    static long calc(int n) {
        if(n==1)
            return x;

        if(dp[n]!=-1)
            return dp[n];

        long ans;
        if(n%2==0)
            ans = min(calc(n-1)+x, calc(n/2)+y);
        else ans = min(calc(n-1)+x, calc((n-1)/2)+x+y);

        return dp[n] = ans;
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;

public class d1  extends PrintWriter {

    static BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
    // static Scanner s=new Scanner(System.in);
    d1 () { super(System.out); }
    public static void main(String[] args) throws IOException{
        d1  d1=new d1 ();d1.main();d1.flush();
    }
    void main() throws IOException {
        BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
        StringBuffer sb = new StringBuffer();
        StringBuffer sb1 = new StringBuffer();
        PrintWriter out = new PrintWriter(System.out);
          String[] s1 = s();
           int n=i(s1[0]);long x=i(s1[1]);long y=i(s1[2]);
           long[] dp=new long[n+1];
           Arrays.fill(dp,Long.MAX_VALUE);
           dp[0]=0;
           for(int i=1;i<=n;i++){
               dp[i]=Math.min(dp[i],dp[i-1]+x);
                if(2*i<=n){
                    dp[2*i]=Math.min(dp[2*i],dp[i]+y);
                }
           }
        System.out.println(dp[n]);
    }
    public void sort(int[] a,int l,int h){
        if(l==h) return;
        int mid=(l+h)/2;

        sort(a,l,mid);
        sort(a,mid+1,h);
        merge(a,l,(l+h)/2,h);
    }
    void merge(int arr[], int l, int m, int r)
    {
        int n1 = m - l + 1;
        int n2 = r - m;
        int L[] = new int[n1];
        int R[] = new int[n2];
        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];
        int i = 0, j = 0;
        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++;
        }

        while (i < n1) {
            arr[k] = L[i];
            i++;
            k++;
        }
        while (j < n2) {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    static long gcd(long a, long b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    static String[] s() throws IOException {
        return s.readLine().trim().split("\\s+");
    }

    static int i(String ss) {
        return Integer.parseInt(ss);
    }
    static long l(String ss) {
        return Long.parseLong(ss);
    }
}
class Student {
    long  a;long b;int i;long val;
    public Student(long a,long b,int i,long val) {
      this.a=a;this.b=b;this.i=i;this.val=val;
    }
}
class Pair {
    int  a,b;long val;int edgeVal;int train;
    public Pair(int  a,long val,int train){
        this.a=a;this.val=val;this.train=train;}
}
class Sortbyroll implements Comparator<Student> {

    public int compare(Student a, Student b){
        if(a.a<b.a) return 1;
        else if(a.a==b.a){return 0;}
        return -1;  }
}