#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, b, k, t;
  cin >> k >> b >> n >> t;
  long long temp1 = t * (k - 1) + b;
  long long temp2 = (k - 1) + b;
  long long time = 0, sub = 1;
  cout << temp1 << endl;
  for (int i = 1; i <= n; i++) sub = sub * k;
  sub = sub * temp2;
  cout << sub << endl;
  while (sub > temp1) {
    sub = sub / k;
    time++;
  }
  if (k != 1)
    cout << time << endl;
  else
    cout << n - 1;
  return 0;
}
