#include <bits/stdc++.h>
using namespace std;
using vi = vector<long long>;
template <typename T>
std::istream& operator>>(std::istream& input, std::pair<T, T>& data) {
  input >> data.first >> data.second;
  return input;
}
template <typename T>
std::istream& operator>>(std::istream& input, std::vector<T>& data) {
  for (T& first : data) input >> first;
  return input;
}
template <typename T>
std::ostream& operator<<(std::ostream& output, const pair<T, T>& data) {
  output << "(" << data.first << "," << data.second << ")";
  return output;
}
template <typename T>
std::ostream& operator<<(std::ostream& output, const std::vector<T>& data) {
  for (const T& first : data) output << first << " ";
  return output;
}
std::ostream& operator<<(std::ostream& output, const __int128& first) {
  __int128 n = first;
  if (n == 0) {
    output << "0";
    return output;
  }
  if (n < 0) {
    n = -n;
    output << "-";
  }
  string s;
  while (n) {
    s += '0' + (n % 10);
    n /= 10;
  }
  reverse(s.begin(), s.end());
  cout << s;
  return output;
}
long long div_up(long long a, long long b) {
  return a / b + ((a ^ b) > 0 && a % b);
}
long long div_down(long long a, long long b) {
  return a / b - ((a ^ b) < 0 && a % b);
}
long long math_mod(long long a, long long b) { return a - b * div_down(a, b); }
template <class T>
using V = vector<T>;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
long long gcd(long long a, long long b) {
  while (b) {
    tie(a, b) = make_pair(b, a % b);
  }
  return a;
}
long long Bit(long long mask, long long bit) { return (mask >> bit) & 1; }
const long long INF = 1e18;
struct Point {
  long long first, second, v;
};
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, want;
  cin >> n >> want;
  map<long long, long long> best;
  for (long long i = (0); i < (n); ++i) {
    long long v, c;
    cin >> v >> c;
    if (best.find(v) == best.end()) {
      best[v] = INF;
    }
    ckmin(best[v], c);
  }
  V<Point> dp;
  for (auto& e : best) {
    long long v = e.first, c = e.second;
    if (dp.empty()) {
      dp.push_back({0, 0, v});
      continue;
    }
    long long l = -1, r = (long long)dp.size() - 1;
    while (l < r - 1) {
      long long m = (l + r) / 2;
      if (dp[m].second + (dp[m + 1].first - 1 - dp[m].first) * dp[m].v >= c) {
        r = m;
      } else {
        l = m;
      }
    }
    Point p;
    p.first = dp[r].first + div_up(c - dp[r].second, dp[r].v);
    p.second = dp[r].second + dp[r].v * div_up(c - dp[r].second, dp[r].v) - c;
    p.v = v;
    while (dp.size() && dp.back().first >= p.first &&
           dp.back().second <= p.second + (dp.back().first - p.first) * p.v) {
      dp.pop_back();
    }
    if (dp.empty()) {
      assert(p.first == 0);
      dp.push_back(p);
      continue;
    }
    long long left = p.first - 1, right = INF;
    while (left < right - 1) {
      long long m = (left + right) / 2;
      __int128 old =
          dp.back().second + (__int128)(m - dp.back().first) * dp.back().v;
      __int128 neu = p.second + (__int128)(m - p.first) * p.v;
      if (old <= neu) {
        right = m;
      } else {
        left = m;
      }
    }
    p.second += p.v * (right - p.first);
    p.first = right;
    assert(dp.back().first < p.first);
    dp.push_back(p);
  }
  long long sz = dp.size();
  for (long long i = (0); i < (sz - 1); ++i) {
    if (dp[i].second + dp[i].v * (dp[i + 1].first - 1 - dp[i].first) >= want) {
      cout << dp[i].first + div_up(want - dp[i].second, dp[i].v) << '\n';
      exit(0);
    }
  }
  cout << dp.back().first + div_up(want - dp.back().second, dp.back().v)
       << '\n';
}
