package ru.redguy.tasks;

import ru.redguy.ATask;
import ru.redguy.Task;

import java.io.IOException;


@ATask("9")
public class Task9 extends Task {

    //fn = fn-1 + fn-2
    public int fib(int index) {
        if(index == 1 || index == 2) return 1;
        return fib(index-1)+fib(index-2);
    }

    @Override
    public void run() throws IOException {
        System.out.println(fib(18)%50);
    }
}
