#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a, b;
  cin >> n >> m >> a >> b;
  int x = m - n, r = 0, t = 14;
  if (b >= a && a * 8 < x) {
    cout << -1;
    return 0;
  }
  while (x > 0) {
    if (10 <= t && t < 22)
      x -= a;
    else
      x += b;
    t++;
    if (t == 24) r++, t = 0;
  }
  cout << r;
}
