#include <iostream>
using namespace std;
int h, m;
bool f(int t){
long long a = -6*t*t*t*t + h*t*t*t + 2*t*t + t;
if (a <= 0) return true;
else return false;
}
int main(){
cin >> h >> m;
for (int i = 1; i <= m; i ++)
if (f(i)){
cout << "The balloon first touches ground at hour:" << endl;
cout << i << endl;
return 0;
}
cout << "The balloon does not touch ground in the given time." << endl;
return 0;
}