#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
using P = pair<int, int>;

#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); ++i)
#define all(a) (a).begin(), (a).end()

ll keta(ll a, ll b)
{
    int cnt_a = 0, cnt_b = 0;
    while (a)
    {
        cnt_a++;
        a /= 10;
    }
    while (b)
    {
        cnt_b++;
        b /= 10;
    }
    ll ans = max(cnt_a, cnt_b);
    return ans;
}

int main()
{

    ll n;
    cin >> n;

    ll ans = 1001001001;
    for (ll a = 1; a * a <= n; a++)
    {
        if (n % a)
        {
            continue;
        }
        ll b = n / a;
        ans = min(ans, keta(a, b));
    }

    cout << ans << '\n';
    return (0);
}

#include <algorithm>
#include <functional>
#include <iostream>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

using ll = long long;
using ull = unsigned long long;

using vll = vector<ll>;

void solve();

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

  solve();

  return 0;
}

#define ini(...)   \
  int __VA_ARGS__; \
  in(__VA_ARGS__)

#define inl(...)  \
  ll __VA_ARGS__; \
  in(__VA_ARGS__)

#define ins(...)      \
  string __VA_ARGS__; \
  in(__VA_ARGS__);

void in() {}
template <typename T, class... U>
void in(T& t, U&... u) {
  cin >> t;
  in(u...);
}

void out() {
  cout << endl;
}
template <typename T, class... U>
void out(const T& t, const U&... u) {
  cout << t;
  if (sizeof...(u))
    cout << " ";
  out(u...);
}

#define rep(i, n) for (long long i = 0; i < n; i++)

void solve();
#ifndef ONLINE_JUDGE
#include "./lib.hpp"
#endif

void solve() {
    inl(N, A, B);
    vll X(N);
    rep(i, N) cin >> X[i];

    ll ret = 0;
    rep(i, N - 1)
        ret += min(A * (X[i + 1] - X[i]), B);
    out(ret);
}
