public static int fibonacci3(int n){
        if(n == 0) return 0;
        if(n == 1) return 1;
        int first = 0, second = 1, result = 0;
        for(int i = 2; i <= n; i++){
            result = first + second;
            first = second;
            second = result;
        }
        return result;
    }