#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define REP(i, n) FOR(i, 0, (n))
#define REPR(i, n) FORR(i, (n) - 1, 0)
#define REP1(i, n) FOR(i, 1, (n) + 1)

int main(void){
  ld n,d,h;
  cin >> n >> d >> h;
  //vector<pair<int,int>> hd(n);
  ld maxh=0,maxd=0;

  ld x = 100000;
  // REP(i,n){
  //   ld tmpd,tmph;
  //   cin >> tmpd >> tmph;
  //   if(tmph > maxh){
  //     maxh = tmph;
  //     maxd = tmpd;
  //   }
  //   if(tmph == maxh && tmpd < maxd){
  //     maxd = tmpd;
  //   }
  //   if(x > (h-tmph)/(d-tmpd)) x = (h-tmph)/(d-tmpd);
  // }

  REP(i,n){
    ld tmpd,tmph;
    cin >> tmpd >> tmph;
    // if(tmph > maxh){
    //   maxh = tmph;
    //   maxd = tmpd;
    // }
    // if(tmph == maxh && tmpd < maxd){
    //   maxd = tmpd;
    // }
    if(x > (h-tmph)/(d-tmpd)){
      x = (h-tmph)/(d-tmpd);
      maxh = tmph;
      maxd = tmpd;
    } 
  }


  // REP(i,n){
  //   ld tmph,tmpd;
  //   cin >> tmpd >> tmph;
  //   if(x > (h-tmph)/(d-tmpd)) x = (h-tmph)/(d-tmpd);
  // }

  ld ans = maxh - x*maxd;
  if(ans < 0) ans = 0;
  cout << fixed << setprecision(15) << ans << endl;
}
#pragma region Macros
#include <bits/stdc++.h>
#if defined(LOCAL) || defined(ONLINE_JUDGE) || defined(_DEBUG)
#include <atcoder/all>
#endif
using namespace std;
#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i, n) for(int i=(n); i>=0; --i)
#define FOR(i, n, m) for(int i=(m), i##_len=(n); i<i##_len; ++i)
#define EACH(i, v) for(const auto& i : v)
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
template<class T>using vec = vector<T>;
template<class T, class U>using umap = unordered_map<T, U>;
template<class T>using uset = unordered_set<T>;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
//using T = tuple<ll, ll, ll>;
using vl = vec<ll>;
#define fi first
#define se second
#define el endl
constexpr ll INF = numeric_limits<ll>::max()/2-1;
#pragma endregion

#pragma region IOMacros
template<class T>
istream &operator>>(istream &stream, vec<T>& o){REP(i, o.size())stream >> o[i];return stream;}
template<class T>
ostream &operator<<(ostream &stream, vec<T>& objs){REP(i, objs.size())stream << objs[i] << " ";stream << el;return stream;}

#define I(T, ...) ;T __VA_ARGS__;__i(__VA_ARGS__);
void __i() {}
template<class T, class... Ts> void __i(T&& o, Ts&&... args){cin >> o;__i(forward<Ts>(args)...);}

void O() {cout << el;}
template<class T, class... Ts> void O(T&& o, Ts&&... args){cerr << o << " ";O(forward<Ts>(args)...);}
#pragma endregion

void Main();

int main(){
    std::cin.tie(nullptr);
    std::cout << std::fixed << std::setprecision(15);
    Main();
    return 0;
}

void Main(){
    I(string, S);
    vl C(10);
    REP(i, S.length()){
        if(S[i] == 'o'){
            C[i] = 1;
        }else if(S[i] == '?'){
            C[i] = -1;
        }
    }
    ll cnt = 0;
    // o:1, x:0, ?:-1
    REP(i, 10000){
        ll t = i;
        vl m(10);
        REP(j, 4){
            ll s = t%10;
            m[s] = 1;
            t/=10;
        }
        ll flg = true;
        REP(j, 10){
            if(
                (C[j] == 0 && m[j] == 1) ||
                (C[j] == 1 && m[j] == 0)
            ){
                flg = false;break;
            }
        }
        if(flg){
            cnt++;
        }
    }
    cout << cnt << el;
}
