#include<stdio.h>
#include<string.h>

#define MAX_NAME_LENGTH 50

typedef struct {
    char name[MAX_NAME_LENGTH];
    int id;
    float price;
} product;

int main() {
    int n;
    printf("Enter the number of products: ");
    scanf("%d", &n);
    
    if (n < 0) {
        printf("Invalid input\n");
        return 1;
    }
    
    product cart;
    float total_amount = 0.0;
    
    for (int i = 0; i < n; i++) {
        printf("Enter product name, ID, and price for product %d: ", i + 1);
        scanf("%s %d %f", cart[i].name, &cart[i].id, &cart[i].price);
        total_amount += cart[i].price;
    }
    
    printf("Total checkout amount: %.2f\n", total_amount);
    
    return 0;
}