Revert Values (Array) : I would like to understand this code that I found online, I just started learning to programm with arrays which have saved me a lot of lines of code, but I do not understand this code at all 

    // C++ Program to reverse an array
 
#include <iostream>
using namespace std;
  
int main(){
    int input[500], output[500], count, i;
      
    cout << "Enter number of elements in array\n";
    cin >> count;
     
    cout << "Enter " << count << " numbers \n";
      
    for(i = 0; i < count; i++){
        cin >> input[i];
    }
      
    // Copy numbers from inputArray to outputArray in 
    // reverse order 
    for(i = 0; i < count; i++){
        output[i] = input[count-i-1];
    }    
    // Print Reversed array
    cout << "Reversed Array\n";
    for(i = 0; i < count; i++){
        cout << output[i] << " ";
    }
          
    return 0;
}

The part where it says that it copies the input array to output array in reverse really confuses me, I do not understand how it reverts the values.

    for(i = 0; i < count; i++){
        output[i] = input[count-i-1];
    } 

Could anyone explain me how that part works?