Олимпиадный тренинг

Задача 39183. 16-04


Задача

Темы: ЕГЭ
The algorithm for calculating the value of the function F(n), where n – natural number, given by the following relations:

F(n) = 5 if n <= 0;
F(n) = F(n / 15) + F(n - 10)
if n > 0, and the number n is a multiple of 15;
F(n) = F(n - 3) if n > 0, the number n when divided by 15 is 3;
F(n) = F(n - 1) + n if n > 0 and n is not a multiple of 15, and when divided by 15 the remainder is not 3;

What is the minimum value of n, for F(n) to exceed 200?