void main(){ import std.stdio, std.string, std.conv, std.algorithm; int n; rd(n); int c, v; rd(c, v); auto rec=new int[](3*n); fill(rec, 1_000_000_000); rec[0]=rec[1]=0; foreach(i; 1..n)for(int j=1; i*(1+j)<=n*2; j++){ chmin(rec[i*(1+j)], rec[i]+c+v*j); } writeln(reduce!(min)(rec[n..(2*n+1)])); } void chmin(T)(ref T x, T y){ if(x>y) x=y; } void rd(T...)(ref T x){ import std.stdio, std.string, std.conv; auto l=readln.split; assert(l.length==x.length); foreach(i, ref e; x){ e=l[i].to!(typeof(e)); } }