#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int oo = 1e9 + 7;
const ll mod = 1e9 + 7, maxn = 100010;
const double PI = acos(-1);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ll h, f, a, b, time, t = 0;
  cin >> h >> f >> a >> b;
  for (time = 15; time < 10000000; time++) {
    if (t == 0) {
      h += a;
    } else {
      h -= b;
    }
    if (time % 24 == 10 || time % 24 == 22) t ^= 1;
    if (h >= f) break;
  }
  if (time == 10000000) {
    cout << -1 << endl;
  } else {
    time -= 10;
    cout << (time) / 24LL << endl;
  }
  return 0;
}
