Sir this is my code. I am getting the verdict TLE. Please help me.

#include<iostream>using namespace std;long int arr[200000],res = 0;long int process(int x);int main(){long int n,res,i;cin>>n;for(i=0;i<n;i++){cin>>arr[i];}res = process(n-1);cout<<res;return 0;}long int process(int i){if(i < 2){return 0;}res = min(arr[i] + process(i-1),min(arr[i-1] + process(i-2),arr[i-2] + process(i-3)));return res;