#include using namespace std; typedef long long ll; signed main(){ //cout << setprecision(12) ; ios::sync_with_stdio(false); cin.tie(0); ll n; cin>>n; ll h[n]; for(int i=0;i>h[i]; } sort(h,h+n); ll dp[n+1][4]={}; dp[0][1]=1e18; for(int i=0;i