/************************************************
 ** Use the debugger to step through this program
 ** and figure out what (if any) useful work the
 ** mystery function accomplishes.
 ************************************************/
#include <iostream>
using namespace std;

int mystery(int);

int main()
{
  int n;
  cout << "Enter a (small) integer: ";
  cin >> n;
  int ans = mystery(n);
  cout << "Result is " << ans << endl;
  return 0;
}

int mystery(int k)
{
  if (k <= 1)
    return 1;

  int t = mystery(k - 1);

  int ans = k*t;

  return ans;
}